8000 [3.13] gh-129185: Fix PyTraceMalloc_Untrack() at Python exit (#129191) by vstinner · Pull Request #129217 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

[3.13] gh-129185: Fix PyTraceMalloc_Untrack() at Python exit (#129191) #129217

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 1 commit into from
Jan 23, 2025

Conversation

vstinner
Copy link
Member
@vstinner vstinner commented Jan 23, 2025

Support calling PyTraceMalloc_Track() and PyTraceMalloc_Untrack() during late Python finalization.

  • Call _PyTraceMalloc_Fini() later in Python finalization.
  • Test also PyTraceMalloc_Untrack() without the GIL
  • PyTraceMalloc_Untrack() now gets the GIL.
  • Test also PyTraceMalloc_Untrack() in test_tracemalloc_track_race().

(cherry picked from commit 46c7e13)

…29191)

Support calling PyTraceMalloc_Track() and PyTraceMalloc_Untrack()
during late Python finalization.

* Call _PyTraceMalloc_Fini() later in Python finalization.
* Test also PyTraceMalloc_Untrack() without the GIL
* PyTraceMalloc_Untrack() now gets the GIL.
* Test also PyTraceMalloc_Untrack() in test_tracemalloc_track_race().

(cherry picked from commit 46c7e13)
@miss-islington-app
Copy link

Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12.
🐍🍒⛏🤖

@miss-islington-app
Copy link

Sorry, @vstinner, I could not cleanly backport this to 3.12 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker e3b3e01d6a6f43c15890d14f139f38155601643a 3.12

@bedevere-app
Copy link
bedevere-app bot commented Jan 23, 2025

GH-129221 is a backport of this pull request to the 3.12 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.12 only security fixes label Jan 23, 2025
@bedevere-app
Copy link
bedevere-app bot commented Jan 23, 2025

GH-129221 is a backport of this pull request to the 3.12 branch.

vstinner added a commit that referenced this pull request Jan 23, 2025
#129217) (#129221)

[3.13] gh-129185: Fix PyTraceMalloc_Untrack() at Python exit (#129191) (#129217)

gh-129185: Fix PyTraceMalloc_Untrack() at Python exit (#129191)

Support calling PyTraceMalloc_Track() and PyTraceMalloc_Untrack()
during late Python finalization.

* Call _PyTraceMalloc_Fini() later in Python finalization.
* Test also PyTraceMalloc_Untrack() without the GIL
* PyTraceMalloc_Untrack() now gets the GIL.
* Test also PyTraceMalloc_Untrack() in test_tracemalloc_track_race().

(che
6E43
rry picked from commit 46c7e13)
(cherry picked from commit e3b3e01)
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.

1 participant
0