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-103879: Fix refleak in super specialization #103882

Merged
merged 1 commit into from
Apr 26, 2023

Conversation

JelleZijlstra
Copy link
Member

@JelleZijlstra JelleZijlstra commented Apr 26, 2023

@JelleZijlstra JelleZijlstra added the 🔨 test-with-refleak-buildbots Test PR w/ refleak buildbots; report in status section label Apr 26, 2023
@JelleZijlstra JelleZijlstra requested a review from carljm April 26, 2023 14:53
@bedevere-bot
Copy link

🤖 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-bot bedevere-bot removed the 🔨 test-with-refleak-buildbots Test PR w/ refleak buildbots; report in status section label Apr 26, 2023
Copy link
Member

@carljm carljm left a comment

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
Member Author

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
Member Author

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:main Apr 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 free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants