Skip to content

Conversation

ashm-dev
Copy link
Contributor

@ashm-dev ashm-dev commented Oct 15, 2025

The memcpy() call in _PyInterpreterState_New() was overwriting the
_malloced pointer that was set by alloc_interpreter(), causing a memory
leak when subinterpreters were destroyed.

Fixed by preserving the _malloced pointer across the memcpy().

CC: @ZeroIntensity This is a fixed version without problems with asan and tsan.

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.

1 participant