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

Skip to content

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

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

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().

(cherry picked from commit 46c7e13) (cherry picked from commit e3b3e01)

…ython#129191) (python#129217)

pythongh-129185: Fix PyTraceMal
8000
loc_Untrack() at Python exit (python#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().

(cherry picked from commit 46c7e13)
(cherry picked from commit e3b3e01)
@vstinner vstinner changed the title [3.12] gh-129185: Fix PyTraceMalloc_Untrack() at Python exit (#129191… [3.12] gh-129185: Fix PyTraceMalloc_Untrack() at Python exit (#129191) (#129217) Jan 23, 2025
@vstinner vstinner enabled auto-merge (squash) January 23, 2025 13:12
@vstinner vstinner merged commit bb7c54d into python:3.12 Jan 23, 2025
29 checks passed
@vstinner vstinner deleted the tracemalloc12 branch January 23, 2025 13:29
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