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

[3.13] gh-128679: Clear the ref trace in _PyTraceMalloc_Stop() #129258

Merged
merged 1 commit into from
Jan 24, 2025

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Jan 24, 2025

_PyTraceMalloc_Stop() now calls PyRefTracer_SetTracer(NULL, NULL).

_PyTraceMalloc_Stop() now calls PyRefTracer_SetTracer(NULL, NULL).
@@ -986,6 +986,8 @@ _PyTraceMalloc_Stop(void)
raw_free(tracemalloc_traceback);
tracemalloc_traceback = NULL;

(void)PyRefTracer_SetTracer(NULL, NULL);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens if the user had installed their own reftracers? Will they get overwritten?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They are overwritten, right.

@vstinner vstinner changed the title gh-128679: Clear the ref trace in _PyTraceMalloc_Stop() [3.13] gh-128679: Clear the ref trace in _PyTraceMalloc_Stop() Jan 24, 2025
@vstinner
Copy link
Member Author

cc @pablogsal

@vstinner vstinner merged commit 1ee321b into python:3.13 Jan 24, 2025
38 checks passed
@vstinner vstinner deleted the tracemalloc_stop13 branch January 24, 2025 13:54
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.

2 participants