KEMBAR78
gh-101967: add a missing error check by Eclips4 · Pull Request #101968 · python/cpython · GitHub
Skip to content

Conversation

@Eclips4
Copy link
Member

@Eclips4 Eclips4 commented Feb 16, 2023

Resolves #101967
According to the semantics of function, I prefered to return 1 instead of NULL. Does it correct?

@Eclips4 Eclips4 requested a review from markshannon as a code owner February 16, 2023 23:26
@Eclips4 Eclips4 changed the title ceval.c: Fix possible segfault in positional_only_passed_as_keyword function gh-101967: ceval.c Fix possible segfault in positional_only_passed_as_keyword function Feb 16, 2023
@carljm carljm changed the title gh-101967: ceval.c Fix possible segfault in positional_only_passed_as_keyword function gh-101967: Fix possible segfault in positional_only_passed_as_keyword function Feb 16, 2023
@arhadthedev arhadthedev added interpreter-core (Objects, Python, Grammar, and Parser dirs) type-crash A hard crash of the interpreter, possibly with a core dump labels Feb 17, 2023
Copy link
Member

@sobolevn sobolevn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, NULL can be returned by PyList_New when there's no memory left.

I don't think that we need to test this case.

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
@iritkatriel iritkatriel changed the title gh-101967: Fix possible segfault in positional_only_passed_as_keyword function gh-101967: add a missing error check Feb 18, 2023
@iritkatriel iritkatriel added needs backport to 3.11 only security fixes needs backport to 3.10 only security fixes labels Feb 18, 2023
@iritkatriel
Copy link
Member

The MacOS build failure is unrelated.

@iritkatriel iritkatriel merged commit 89413bb into python:main Feb 18, 2023
@miss-islington
Copy link
Contributor

Thanks @Eclips4 for the PR, and @iritkatriel for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10, 3.11.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Feb 18, 2023
(cherry picked from commit 89413bb)

Co-authored-by: Eclips4 <80244920+Eclips4@users.noreply.github.com>
@bedevere-bot
Copy link

GH-102016 is a backport of this pull request to the 3.10 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.10 only security fixes label Feb 18, 2023
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Feb 18, 2023
(cherry picked from commit 89413bb)

Co-authored-by: Eclips4 <80244920+Eclips4@users.noreply.github.com>
miss-islington added a commit that referenced this pull request Feb 18, 2023
(cherry picked from commit 89413bb)

Co-authored-by: Eclips4 <80244920+Eclips4@users.noreply.github.com>
@Eclips4 Eclips4 deleted the issue-101967 branch February 18, 2023 12:02
@Eclips4 Eclips4 restored the issue-101967 branch February 20, 2023 00:09
pablogsal pushed a commit that referenced this pull request Feb 21, 2023
gh-101967: add a missing error check (GH-101968)
(cherry picked from commit 89413bb)

Co-authored-by: Eclips4 <80244920+Eclips4@users.noreply.github.com>
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
@Eclips4 Eclips4 deleted the issue-101967 branch March 20, 2023 10:36
@hauntsaninja hauntsaninja added needs backport to 3.11 only security fixes and removed needs backport to 3.11 only security fixes labels Mar 26, 2023
@miss-islington
Copy link
Contributor

Thanks @Eclips4 for the PR, and @iritkatriel for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

Sorry, @Eclips4 and @iritkatriel, I could not cleanly backport this to 3.11 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 89413bbccb9261b72190e275eefe4b0d49671477 3.11

@bedevere-app
Copy link

bedevere-app bot commented Jan 29, 2024

GH-114738 is a backport of this pull request to the 3.9 branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

interpreter-core (Objects, Python, Grammar, and Parser dirs) type-crash A hard crash of the interpreter, possibly with a core dump

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ceval.c: positional_only_passed_as_keyword can be failed with segfault

8 participants