Skip to content

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

Merged
kumaraditya303 merged 7 commits into
python:mainfrom
colorfulappl:fix_ac_tuple_refcount
Nov 24, 2022
Merged

gh-64490: Fix refcount error when arguments are packed to tuple in argument clinic#99233
kumaraditya303 merged 7 commits into
python:mainfrom
colorfulappl:fix_ac_tuple_refcount

Conversation

@colorfulappl

@colorfulapplcolorfulappl commented Nov 8, 2022

Copy link
Copy Markdown
Contributor

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
Copy Markdown

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
Copy Markdown
ContributorAuthor

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

@erlend-aaslanderlend-aasland left a comment

Copy link
Copy Markdown
Contributor

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?

Comment threadTools/clinic/clinic.py Outdated
@kumaraditya303kumaraditya303 self-assigned this Nov 24, 2022

@kumaraditya303kumaraditya303 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

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

Copy link
Copy Markdown
Contributor

Merged, thanks!

@colorfulappl

Copy link
Copy Markdown
ContributorAuthor

Thank you!

colorfulappl added a commit to colorfulappl/cpython that referenced this pull request Dec 19, 2022
@bedevere-bot

Copy link
Copy Markdown

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

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

Labels

topic-argument-clinictype-bugAn unexpected behavior, bug, or error

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@colorfulappl@bedevere-bot@kumaraditya303@erlend-aasland