Skip to content

gh-103879: Fix refleak in super specialization - #103882

Merged
JelleZijlstra merged 1 commit into
python:mainfrom
JelleZijlstra:fixref
Apr 26, 2023
Merged

gh-103879: Fix refleak in super specialization#103882
JelleZijlstra merged 1 commit into
python:mainfrom
JelleZijlstra:fixref

Conversation

@JelleZijlstra

@JelleZijlstraJelleZijlstra commented Apr 26, 2023

Copy link
Copy Markdown
Member

@JelleZijlstraJelleZijlstra added the 🔨 test-with-refleak-buildbots Test PR w/ refleak buildbots; report in status section label Apr 26, 2023
@bedevere-bot

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @JelleZijlstra for commit fb53869 🤖

If you want to schedule another build, you need to add the 🔨 test-with-refleak-buildbots label again.

@bedevere-botbedevere-bot removed the 🔨 test-with-refleak-buildbots Test PR w/ refleak buildbots; report in status section label Apr 26, 2023

@carljmcarljm left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ugh, sorry about this and for wasting so much of your time tracking these down on your PEP 695 work yesterday!

I thought I'd run the refleak buildbots on the specialization PR, not sure what happened. I think maybe I triggered them but the buildbot fleet was backed up, and so they didn't actually start running for a long time, and then I later rebased the PR again assuming they had run and passed? Will be more careful checking that in future.

Your changes here look correct to me, since the res cached in the inline cache should be a borrowed reference (as noted in the comment), not a strong reference.

Approving, assuming the signal all looks green.

@JelleZijlstra

Copy link
Copy Markdown
MemberAuthor

I think there may be an issue where the default buildbot run doesn't include the refleak buildbots. If you look at the commits on github.com/python/cpython, the most recent ones are green, even though the buildbot website shows the refleak buildbots failing on main.

@JelleZijlstra

Copy link
Copy Markdown
MemberAuthor

Also, I now understand why my refleaks kept going away if I removed one too many lines: if the refleak is triggered on specialization, it only manifests if the code gets run enough times.

@JelleZijlstra
JelleZijlstra merged commit 6c4124d into python:mainApr 26, 2023
@JelleZijlstra
JelleZijlstra deleted the fixref branch April 26, 2023 15:50
itamaro pushed a commit to itamaro/cpython that referenced this pull request Apr 26, 2023
@JelleZijlstra
JelleZijlstra restored the fixref branch September 10, 2024 23:37
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@JelleZijlstra@bedevere-bot@carljm@Fidget-Spinner