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

Merged
vstinner merged 1 commit intopython:3.13from
vstinner:tracemalloc13
Jan 23, 2025
Merged

[3.13] gh-129185: Fix PyTraceMalloc_Untrack() at Python exit (#129191)#129217
vstinner merged 1 commit intopython:3.13from
vstinner:tracemalloc13

Conversation

@vstinner
Copy link
Copy Markdown
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() 
8000
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
Copy Markdown

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

@miss-islington-app
Copy link
Copy Markdown

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

cherry_picker e3b3e01d6a6f43c15890d14f139f38155601643a 3.12

@bedevere-app
Copy link
Copy Markdown
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
Copy Markdown
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().

(cherry 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