Skip to content

gh-130382: add missing _PyReftracerTrack to ceval DECREF #130689

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

Merged
merged 8 commits into from
Mar 13, 2025

Conversation

tom-pytel
Copy link
Contributor

@tom-pytel tom-pytel commented Feb 28, 2025

Confirmed PyRefTracer_DESTROY not being sent (with GIL enabled (non-debug build)) when ceval deallocs objects, this fixes it. I don't know of a current method to add a regression test in python (will address in a separate PR).

See: #130696

@tom-pytel
Copy link
Contributor Author

tracemalloc is a no for the test so added to _testcapimodule. Didn't reuse _simpletracer because that stores a limited number of object pointers and I figure its useful to be able to count an arbitrary number of reftraces. Let me know if keep this or move test location or remove.

@colesbury colesbury added the 🔨 test-with-refleak-buildbots Test PR w/ refleak buildbots; report in status section label Mar 13, 2025
@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @colesbury for commit 5f423bc 🤖

Results will be shown at:

https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F130689%2Fmerge

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 Mar 13, 2025
@colesbury colesbury self-assigned this Mar 13, 2025
@colesbury colesbury added the needs backport to 3.13 bugs and security fixes label Mar 13, 2025
@colesbury colesbury merged commit c5abded into python:main Mar 13, 2025
63 checks passed
@miss-islington-app
Copy link

Thanks @tom-pytel for the PR, and @colesbury for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖

@miss-islington-app
Copy link

Sorry, @tom-pytel and @colesbury, I could not cleanly backport this to 3.13 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker c5abded09995f208b21ebaf012185ca5acb0180b 3.13

colesbury pushed a commit to colesbury/cpython that referenced this pull request Mar 13, 2025
…DECREF` (pythonGH-130689)

(cherry picked from commit c5abded)

Co-authored-by: Tomasz Pytel <[email protected]>
@bedevere-app
Copy link

bedevere-app bot commented Mar 13, 2025

GH-131195 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Mar 13, 2025
@colesbury
Copy link
Contributor

Thanks Tom!

@tom-pytel tom-pytel deleted the fix-issue-130382 branch March 13, 2025 18:39
colesbury added a commit that referenced this pull request Mar 14, 2025
GH-130689) (#131195)

(cherry picked from commit c5abded)

Co-authored-by: Tomasz Pytel <[email protected]>
plashchynski pushed a commit to plashchynski/cpython that referenced this pull request Mar 17, 2025
seehwan pushed a commit to seehwan/cpython that referenced this pull request Apr 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants