Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-64490: Fix refcount error when arguments are packed to tuple in argument clinic #99233

Merged
merged 7 commits into from Nov 24, 2022

Conversation

colorfulappl
Copy link
Contributor

@colorfulappl colorfulappl commented Nov 8, 2022

While Argument Clinic generated code is packing varargs to a tuple, the arguments' refcounts are not increased.
So all the packed arguments‘ refcounts are decreased 1 improperly when the tuple is released later.

This bug is found in #96178 "Argument Clinic functional test".

@bedevere-bot
Copy link

Most changes to Python require a NEWS entry.

Please add it using the blurb_it web app or the blurb command-line tool.

colorfulappl added a commit to colorfulappl/cpython that referenced this pull request Nov 8, 2022
@colorfulappl
Copy link
Contributor Author

Added Argument Clinic functional test (#96002).
@erlend-aasland @kumaraditya303

Copy link
Contributor

@erlend-aasland erlend-aasland left a comment

Choose a reason for hiding this comment

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

LGTM. Kumar, do you have any remarks?

@kumaraditya303 kumaraditya303 self-assigned this Nov 24, 2022
Copy link
Contributor

@kumaraditya303 kumaraditya303 left a comment

Choose a reason for hiding this comment

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

LGTM

@kumaraditya303 kumaraditya303 added type-bug An unexpected behavior, bug, or error topic-argument-clinic labels Nov 24, 2022
@kumaraditya303 kumaraditya303 merged commit 69f6cc7 into python:main Nov 24, 2022
@kumaraditya303
Copy link
Contributor

Merged, thanks!

@colorfulappl
Copy link
Contributor Author

Thank you!

colorfulappl added a commit to colorfulappl/cpython that referenced this pull request Dec 19, 2022
…o tuple in argument clinic (python#99233)

(cherry picked from commit 69f6cc7)
@bedevere-bot
Copy link

GH-100338 is a backport of this pull request to the 3.11 branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic-argument-clinic type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants