You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Memory leak in test_capi with subinterpreter creation #140301
LeakSanitizer detects memory leaks when running test_capi with refleak detection. The leaks occur during subinterpreter creation via Py_NewInterpreterFromConfig().
Affected Versions
Python 3.12
Python 3.13
Python 3.14
CPython main branch
Steps to Reproduce
Build CPython with AddressSanitizer and debug mode:
CC=clang CXX=clang++ ./configure --with-address-sanitizer --with-pydebug --with-undefined-behavior-sanitizer --disable-optimizations && make -j$(nproc)
Run test_capi with refleak detection:
./python -X dev -X showrefcount -m test -R 5:5 test_capi -j$(nproc)
In the future, would you mind including locations (preferably a GitHub source link) in your reports? It's extra work for us when you just drop large log files.
Activity
ZeroIntensity commentedon Oct 18, 2025
In the future, would you mind including locations (preferably a GitHub source link) in your reports? It's extra work for us when you just drop large log files.
ashm-dev commentedon Oct 18, 2025
Sure, I'll include GitHub source links in future reports. Thanks for the feedback!
ashm-dev commentedon Oct 18, 2025
I'll take a shot at fixing this, but no promises :)
pythongh-140301: Fix memory leak in subinterpreter PyConfig cleanup
gh-140301: Fix memory leak in subinterpreter `PyConfig` cleanup (#140303
pythongh-140301: Fix memory leak in subinterpreter `PyConfig` cleanup (…
[3.14] gh-140301: Fix memory leak in subinterpreter `PyConfig` cleanup (
pythongh-140301: Fix memory leak in subinterpreter `PyConfig` cleanup (…
[3.13] pythongh-140301: Fix memory leak in subinterpreter PyConfig cl…
[3.13] pythongh-140301: Fix memory leak in subinterpreter `PyConfig` …
[3.13] gh-140301: Fix memory leak in subinterpreter PyConfig cleanup (G…
pythongh-140301: Fix memory leak in subinterpreter `PyConfig` cleanup (…