Repository navigation
memory leak in threading stack size #141044
Copy link
Copy link
Open
Labels
3.14bugs and security fixesbugs and security fixes3.15bugs and security fixesbugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Activity
- addedtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
on Nov 5, 2025 - added3.14bugs and security fixesbugs and security fixes3.15bugs and security fixesbugs and security fixes
on Nov 5, 2025 Thanks for the report!
I can reproduce this issue with the following build command:
./configure --with-address-sanitizer --with-pydebug && make -jAnd I have to say that on main we have one list of leaks (6 allocation, as in the first post), on 3.13 there's no leaks and on 3.14 there's another list of leaks:
LeakSanitizer output on 3.14
================================================================= ==1434113==ERROR: LeakSanitizer: detected memory leaks Direct leak of 88 byte(s) in 1 object(s) allocated from: #0 0x7fc5fdab89cf in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:69 #1 0x55d621487a7a in _PyMem_RawMalloc Objects/obmalloc.c:63 #2 0x55d621486ef3 in _PyMem_DebugRawAlloc Objects/obmalloc.c:2872 #3 0x55d621486f57 in _PyMem_DebugRawMalloc Objects/obmalloc.c:2905 #4 0x55d6214886ab in _PyMem_DebugMalloc Objects/obmalloc.c:3070 #5 0x55d6214af46b in PyObject_Malloc Objects/obmalloc.c:1478 #6 0x55d6216dcb12 in _PyObject_MallocWithType Include/internal/pycore_object_alloc.h:46 #7 0x55d6216dcb12 in gc_alloc Python/gc.c:2288 #8 0x55d6216dcc6a in _PyObject_GC_New Python/gc.c:2308 #9 0x55d6213ce64f in PyMethod_New Objects/classobject.c:119 #10 0x55d62141c209 in cm_descr_get Objects/funcobject.c:1470 #11 0x55d6214f6780 in _Py_type_getattro_impl Objects/typeobject.c:6061 #12 0x55d6214f6960 in _Py_type_getattro Objects/typeobject.c:6103 #13 0x55d6214814c7 in PyObject_GetAttr Objects/object.c:1299 #14 0x55d62148180d in _PyObject_GetMethod Objects/object.c:1590 #15 0x55d6216520ba in _PyEval_EvalFrameDefault Python/generated_cases.c.h:8019 #16 0x55d6216717db in _PyEval_EvalFrame Include/internal/pycore_ceval.h:121 #17 0x55d621671ab4 in _PyEval_Vector Python/ceval.c:1965 #18 0x55d6213c6fda in _PyFunction_Vectorcall Objects/call.c:413 #19 0x55d6213c7499 in _PyObject_VectorcallTstate Include/internal/pycore_call.h:169 #20 0x55d6213c78f3 in _PyObject_CallFunctionVa Objects/call.c:552 #21 0x55d6213c7e92 in callmethod Objects/call.c:626 #22 0x55d6213c807e in PyObject_CallMethod Objects/call.c:645 #23 0x55d62170162e in init_importlib Python/import.c:3236 #24 0x55d6217026f3 in _PyImport_InitCore Python/import.c:4073 #25 0x55d621747f17 in pycore_interp_init Python/pylifecycle.c:925 #26 0x55d621748115 in pyinit_config Python/pylifecycle.c:954 #27 0x55d6217528db in pyinit_core Python/pylifecycle.c:1117 #28 0x55d621752b04 in Py_InitializeFromConfig Python/pylifecycle.c:1437 #29 0x55d6217baafd in pymain_init Modules/main.c:68 #30 0x55d6217baee1 in pymain_main Modules/main.c:796 Indirect leak of 96 byte(s) in 1 object(s) allocated from: #0 0x7fc5fdab89cf in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:69 #1 0x55d621487a7a in _PyMem_RawMalloc Objects/obmalloc.c:63 #2 0x55d621486ef3 in _PyMem_DebugRawAlloc Objects/obmalloc.c:2872 #3 0x55d621486f57 in _PyMem_DebugRawMalloc Objects/obmalloc.c:2905 #4 0x55d6214886ab in _PyMem_DebugMalloc Objects/obmalloc.c:3070 #5 0x55d6214af46b in PyObject_Malloc Objects/obmalloc.c:1478 #6 0x55d6216dcb12 in _PyObject_MallocWithType Include/internal/pycore_object_alloc.h:46 #7 0x55d6216dcb12 in gc_alloc Python/gc.c:2288 #8 0x55d6216dcd6f in _PyObject_GC_NewVar Python/gc.c:2330 #9 0x55d6214c4f25 in tuple_alloc Objects/tupleobject.c:57 #10 0x55d6214c81ad in _PyTuple_FromArray Objects/tupleobject.c:393 #11 0x55d6213e5f50 in method_vectorcall_VARARGS Objects/descrobject.c:316 #12 0x55d6213c7499 in _PyObject_VectorcallTstate Include/internal/pycore_call.h:169 #13 0x55d6213c7584 in PyObject_Vectorcall Objects/call.c:327 #14 0x55d621639c5e in _PyEval_EvalFrameDefault Python/generated_cases.c.h:4079 #15 0x55d6216717db in _PyEval_EvalFrame Include/internal/pycore_ceval.h:121 #16 0x55d621671ab4 in _PyEval_Vector Python/ceval.c:1965 #17 0x55d6213c6fda in _PyFunction_Vectorcall Objects/call.c:413 #18 0x55d6213c7499 in _PyObject_VectorcallTstate Include/internal/pycore_call.h:169 #19 0x55d6213c8eff in object_vacall Objects/call.c:819 #20 0x55d6213c9123 in PyObject_CallMethodObjArgs Objects/call.c:880 #21 0x55d6216fb0db in import_find_and_load Python/import.c:3726 #22 0x55d621701d79 in PyImport_ImportModuleLevelObject Python/import.c:3808 #23 0x55d62161dfdd in _PyEval_ImportName Python/ceval.c:2981 #24 0x55d62164808b in _PyEval_EvalFrameDefault Python/generated_cases.c.h:6345 #25 0x55d6216717db in _PyEval_EvalFrame Include/internal/pycore_ceval.h:121 #26 0x55d621671ab4 in _PyEval_Vector Python/ceval.c:1965 #27 0x55d621671d3d in PyEval_EvalCode Python/ceval.c:857 #28 0x55d62160e430 in builtin_exec_impl Python/bltinmodule.c:1180 #29 0x55d62160e701 in builtin_exec Python/clinic/bltinmodule.c.h:571 #30 0x55d621473bc2 in cfunction_vectorcall_FASTCALL_KEYWORDS Objects/methodobject.c:465 Indirect leak of 96 byte(s) in 1 object(s) allocated from: #0 0x7fc5fdab89cf in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:69 #1 0x55d621487a7a in _PyMem_RawMalloc Objects/obmalloc.c:63 #2 0x55d621486ef3 in _PyMem_DebugRawAlloc Objects/obmalloc.c:2872 #3 0x55d621486f57 in _PyMem_DebugRawMalloc Objects/obmalloc.c:2905 #4 0x55d6214886ab in _PyMem_DebugMalloc Objects/obmalloc.c:3070 #5 0x55d6214af46b in PyObject_Malloc Objects/obmalloc.c:1478 #6 0x55d6216dcb12 in _PyObject_MallocWithType Include/internal/pycore_object_alloc.h:46 #7 0x55d6216dcb12 in gc_alloc Python/gc.c:2288 #8 0x55d6216dcc6a in _PyObject_GC_New Python/gc.c:2308 #9 0x55d6214753e9 in PyCMethod_New Objects/methodobject.c:108 #10 0x55d6213e361b in method_get Objects/descrobject.c:158 #11 0x55d621482a13 in _PyObject_GenericGetAttrWithDict Objects/object.c:1765 #12 0x55d6214838ea in PyObject_GenericGetAttr Objects/object.c:1795 #13 0x55d6214814c7 in PyObject_GetAttr Objects/object.c:1299 #14 0x55d6216522e3 in _PyEval_EvalFrameDefault Python/generated_cases.c.h:8040 #15 0x55d6216717db in _PyEval_EvalFrame Include/internal/pycore_ceval.h:121 #16 0x55d621671ab4 in _PyEval_Vector Python/ceval.c:1965 #17 0x55d6213c6fda in _PyFunction_Vectorcall Objects/call.c:413 #18 0x55d6213ccf7c in _PyObject_VectorcallTstate Include/internal/pycore_call.h:169 #19 0x55d6213cd3f5 in method_vectorcall Objects/classobject.c:73 #20 0x55d6213ca2bf in _PyVectorcall_Call Objects/call.c:273 #21 0x55d6213ca89c in _PyObject_Call Objects/call.c:348 #22 0x55d6213ca8de in PyObject_Call Objects/call.c:373 #23 0x55d62189c496 in thread_run Modules/_threadmodule.c:359 #24 0x55d62178dea0 in pythread_wrapper Python/thread_pthread.h:242 #25 0x7fc5fd7c71f4 in start_thread nptl/pthread_create.c:442 Indirect leak of 96 byte(s) in 1 object(s) allocated from: #0 0x7fc5fdab89cf in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:69 #1 0x55d621487a7a in _PyMem_RawMalloc Objects/obmalloc.c:63 #2 0x55d621486ef3 in _PyMem_DebugRawAlloc Objects/obmalloc.c:2872 #3 0x55d621486f57 in _PyMem_DebugRawMalloc Objects/obmalloc.c:2905 #4 0x55d6214886ab in _PyMem_DebugMalloc Objects/obmalloc.c:3070 #5 0x55d6214af46b in PyObject_Malloc Objects/obmalloc.c:1478 #6 0x55d6216dcb12 in _PyObject_MallocWithType Include/internal/pycore_object_alloc.h:46 #7 0x55d6216dcb12 in gc_alloc Python/gc.c:2288 #8 0x55d6216dcd6f in _PyObject_GC_NewVar Python/gc.c:2330 #9 0x55d6214c4f25 in tuple_alloc Objects/tupleobject.c:57 #10 0x55d6214c81ad in _PyTuple_FromArray Objects/tupleobject.c:393 #11 0x55d6213e5f50 in method_vectorcall_VARARGS Objects/descrobject.c:316 #12 0x55d6213c7499 in _PyObject_VectorcallTstate Include/internal/pycore_call.h:169 #13 0x55d6213c7584 in PyObject_Vectorcall Objects/call.c:327 #14 0x55d62162a9fd in _PyEval_EvalFrameDefault Python/generated_cases.c.h:1619 #15 0x55d6216717db in _PyEval_EvalFrame Include/internal/pycore_ceval.h:121 #16 0x55d621671ab4 in _PyEval_Vector Python/ceval.c:1965 #17 0x55d6213c6fda in _PyFunction_Vectorcall Objects/call.c:413 #18 0x55d6213ccf7c in _PyObject_VectorcallTstate Include/internal/pycore_call.h:169 #19 0x55d6213cd3f5 in method_vectorcall Objects/classobject.c:73 #20 0x55d6213ca2bf in _PyVectorcall_Call Objects/call.c:273 #21 0x55d6213ca89c in _PyObject_Call Objects/call.c:348 #22 0x55d6213ca8de in PyObject_Call Objects/call.c:373 #23 0x55d62189c496 in thread_run Modules/_threadmodule.c:359 #24 0x55d62178dea0 in pythread_wrapper Python/thread_pthread.h:242 #25 0x7fc5fd7c71f4 in start_thread nptl/pthread_create.c:442 Indirect leak of 96 byte(s) in 1 object(s) allocated from: #0 0x7fc5fdab89cf in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:69 #1 0x55d621487a7a in _PyMem_RawMalloc Objects/obmalloc.c:63 #2 0x55d621486ef3 in _PyMem_DebugRawAlloc Objects/obmalloc.c:2872 #3 0x55d621486f57 in _PyMem_DebugRawMalloc Objects/obmalloc.c:2905 #4 0x55d6214886ab in _PyMem_DebugMalloc Objects/obmalloc.c:3070 #5 0x55d6214af46b in PyObject_Malloc Objects/obmalloc.c:1478 #6 0x55d6216dcb12 in _PyObject_MallocWithType Include/internal/pycore_object_alloc.h:46 #7 0x55d6216dcb12 in gc_alloc Python/gc.c:2288 #8 0x55d6216dcd6f in _PyObject_GC_NewVar Python/gc.c:2330 #9 0x55d6214c4f25 in tuple_alloc Objects/tupleobject.c:57 #10 0x55d6214c7aff in PyTuple_New Objects/tupleobject.c:81 #11 0x55d621737d13 in r_object Python/marshal.c:1372 #12 0x55d6217389df in r_object Python/marshal.c:1560 #13 0x55d621737ece in r_object Python/marshal.c:1378 #14 0x55d6217389af in r_object Python/marshal.c:1554 #15 0x55d6217397de in read_object Python/marshal.c:1714 #16 0x55d621739a13 in marshal_loads_impl Python/marshal.c:2057 #17 0x55d62173a0d9 in marshal_loads Python/clinic/marshal.c.h:344 #18 0x55d62162f7b6 in _PyEval_EvalFrameDefault Python/generated_cases.c.h:2383 #19 0x55d6216717db in _PyEval_EvalFrame Include/internal/pycore_ceval.h:121 #20 0x55d621671ab4 in _PyEval_Vector Python/ceval.c:1965 #21 0x55d6213c6fda in _PyFunction_Vectorcall Objects/call.c:413 #22 0x55d6213c7499 in _PyObject_VectorcallTstate Include/internal/pycore_call.h:169 #23 0x55d6213c8eff in object_vacall Objects/call.c:819 #24 0x55d6213c9123 in PyObject_CallMethodObjArgs Objects/call.c:880 #25 0x55d6216fb0db in import_find_and_load Python/import.c:3726 #26 0x55d621701d79 in PyImport_ImportModuleLevelObject Python/import.c:3808 #27 0x55d62161dfdd in _PyEval_ImportName Python/ceval.c:2981 #28 0x55d62164808b in _PyEval_EvalFrameDefault Python/generated_cases.c.h:6345 #29 0x55d6216717db in _PyEval_EvalFrame Include/internal/pycore_ceval.h:121 #30 0x55d621671ab4 in _PyEval_Vector Python/ceval.c:1965 Indirect leak of 88 byte(s) in 1 object(s) allocated from: #0 0x7fc5fdab89cf in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:69 #1 0x55d621487a7a in _PyMem_RawMalloc Objects/obmalloc.c:63 #2 0x55d621486ef3 in _PyMem_DebugRawAlloc Objects/obmalloc.c:2872 #3 0x55d621486f57 in _PyMem_DebugRawMalloc Objects/obmalloc.c:2905 #4 0x55d6214886ab in _PyMem_DebugMalloc Objects/obmalloc.c:3070 #5 0x55d6214af46b in PyObject_Malloc Objects/obmalloc.c:1478 #6 0x55d6216dcb12 in _PyObject_MallocWithType Include/internal/pycore_object_alloc.h:46 #7 0x55d6216dcb12 in gc_alloc Python/gc.c:2288 #8 0x55d6216dcc6a in _PyObject_GC_New Python/gc.c:2308 #9 0x55d6213ce64f in PyMethod_New Objects/classobject.c:119 #10 0x55d62141c209 in cm_descr_get Objects/funcobject.c:1470 #11 0x55d6214f6780 in _Py_type_getattro_impl Objects/typeobject.c:6061 #12 0x55d6214f6960 in _Py_type_getattro Objects/typeobject.c:6103 #13 0x55d6214814c7 in PyObject_GetAttr Objects/object.c:1299 #14 0x55d6216522e3 in _PyEval_EvalFrameDefault Python/generated_cases.c.h:8040 #15 0x55d6216717db in _PyEval_EvalFrame Include/internal/pycore_ceval.h:121 #16 0x55d621671ab4 in _PyEval_Vector Python/ceval.c:1965 #17 0x55d6213c6fda in _PyFunction_Vectorcall Objects/call.c:413 #18 0x55d6213c7499 in _PyObject_VectorcallTstate Include/internal/pycore_call.h:169 #19 0x55d6213c8eff in object_vacall Objects/call.c:819 #20 0x55d6213c9123 in PyObject_CallMethodObjArgs Objects/call.c:880 #21 0x55d6216fb0db in import_find_and_load Python/import.c:3726 #22 0x55d621701d79 in PyImport_ImportModuleLevelObject Python/import.c:3808 #23 0x55d62161dfdd in _PyEval_ImportName Python/ceval.c:2981 #24 0x55d62164808b in _PyEval_EvalFrameDefault Python/generated_cases.c.h:6345 #25 0x55d6216717db in _PyEval_EvalFrame Include/internal/pycore_ceval.h:121 #26 0x55d621671ab4 in _PyEval_Vector Python/ceval.c:1965 #27 0x55d6213c6fda in _PyFunction_Vectorcall Objects/call.c:413 #28 0x55d6213c7499 in _PyObject_VectorcallTstate Include/internal/pycore_call.h:169 #29 0x55d6213c77b8 in _PyObject_CallNoArgsTstate Include/internal/pycore_call.h:176 #30 0x55d6213c77b8 in _PyObject_CallFunctionVa Objects/call.c:531 #31 0x55d6213c7e92 in callmethod Objects/call.c:626 Indirect leak of 88 byte(s) in 1 object(s) allocated from: #0 0x7fc5fdab89cf in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:69 #1 0x55d621487a7a in _PyMem_RawMalloc Objects/obmalloc.c:63 #2 0x55d621486ef3 in _PyMem_DebugRawAlloc Objects/obmalloc.c:2872 #3 0x55d621486f57 in _PyMem_DebugRawMalloc Objects/obmalloc.c:2905 #4 0x55d6214886ab in _PyMem_DebugMalloc Objects/obmalloc.c:3070 #5 0x55d6214af46b in PyObject_Malloc Objects/obmalloc.c:1478 #6 0x55d6216dcb12 in _PyObject_MallocWithType Include/internal/pycore_object_alloc.h:46 #7 0x55d6216dcb12 in gc_alloc Python/gc.c:2288 #8 0x55d6216dcc6a in _PyObject_GC_New Python/gc.c:2308 #9 0x55d621450e81 in new_dict Objects/dictobject.c:877 #10 0x55d6214525d6 in PyDict_New Objects/dictobject.c:976 #11 0x55d621618abc in initialize_locals Python/ceval.c:1543 #12 0x55d62161b981 in _PyEvalFramePushAndInit Python/ceval.c:1835 #13 0x55d621671a8a in _PyEval_Vector Python/ceval.c:1955 #14 0x55d6213c6fda in _PyFunction_Vectorcall Objects/call.c:413 #15 0x55d6213c9cc4 in _PyObject_VectorcallDictTstate Objects/call.c:135 #16 0x55d6213ca09f in _PyObject_Call_Prepend Objects/call.c:504 #17 0x55d6214d5a32 in slot_tp_new Objects/typeobject.c:10486 #18 0x55d6214e39a8 in type_call Objects/typeobject.c:2309 #19 0x55d6213c728b in _PyObject_MakeTpCall Objects/call.c:242 #20 0x55d6213c9dd5 in _PyObject_VectorcallDictTstate Objects/call.c:130 #21 0x55d6213c9ee6 in PyObject_VectorcallDict Objects/call.c:159 #22 0x55d6216112d8 in builtin___build_class__ Python/bltinmodule.c:214 #23 0x55d621473bc2 in cfunction_vectorcall_FASTCALL_KEYWORDS Objects/methodobject.c:465 #24 0x55d6213c7499 in _PyObject_VectorcallTstate Include/internal/pycore_call.h:169 #25 0x55d6213c7584 in PyObject_Vectorcall Objects/call.c:327 #26 0x55d621632c51 in _PyEval_EvalFrameDefault Python/generated_cases.c.h:2959 #27 0x55d6216717db in _PyEval_EvalFrame Include/internal/pycore_ceval.h:121 #28 0x55d621671ab4 in _PyEval_Vector Python/ceval.c:1965 #29 0x55d621671d3d in PyEval_EvalCode Python/ceval.c:857 #30 0x55d62160e430 in builtin_exec_impl Python/bltinmodule.c:1180 Indirect leak of 88 byte(s) in 1 object(s) allocated from: #0 0x7fc5fdab89cf in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:69 #1 0x55d621487a7a in _PyMem_RawMalloc Objects/obmalloc.c:63 #2 0x55d621486ef3 in _PyMem_DebugRawAlloc Objects/obmalloc.c:2872 #3 0x55d621486f57 in _PyMem_DebugRawMalloc Objects/obmalloc.c:2905 #4 0x55d6214886ab in _PyMem_DebugMalloc Objects/obmalloc.c:3070 #5 0x55d6214af46b in PyObject_Malloc Objects/obmalloc.c:1478 #6 0x55d6216dcb12 in _PyObject_MallocWithType Include/internal/pycore_object_alloc.h:46 #7 0x55d6216dcb12 in gc_alloc Python/gc.c:2288 #8 0x55d6216dcc6a in _PyObject_GC_New Python/gc.c:2308 #9 0x55d621450e81 in new_dict Objects/dictobject.c:877 #10 0x55d6214525d6 in PyDict_New Objects/dictobject.c:976 #11 0x55d62145262d in dict_new_presized Objects/dictobject.c:2153 #12 0x55d62145a087 in _PyDict_FromItems Objects/dictobject.c:2196 #13 0x55d621628755 in _PyEval_EvalFrameDefault Python/generated_cases.c.h:1271 #14 0x55d6216717db in _PyEval_EvalFrame Include/internal/pycore_ceval.h:121 #15 0x55d621671ab4 in _PyEval_Vector Python/ceval.c:1965 #16 0x55d6213c6fda in _PyFunction_Vectorcall Objects/call.c:413 #17 0x55d6213c7499 in _PyObject_VectorcallTstate Include/internal/pycore_call.h:169 #18 0x55d6213c8eff in object_vacall Objects/call.c:819 #19 0x55d6213c9123 in PyObject_CallMethodObjArgs Objects/call.c:880 #20 0x55d6216fb0db in import_find_and_load Python/import.c:3726 #21 0x55d621701d79 in PyImport_ImportModuleLevelObject Python/import.c:3808 #22 0x55d621610049 in builtin___import___impl Python/bltinmodule.c:285 #23 0x55d621610301 in builtin___import__ Python/clinic/bltinmodule.c.h:110 #24 0x55d621473bc2 in cfunction_vectorcall_FASTCALL_KEYWORDS Objects/methodobject.c:465 #25 0x55d6213c7499 in _PyObject_VectorcallTstate Include/internal/pycore_call.h:169 #26 0x55d6213c78f3 in _PyObject_CallFunctionVa Objects/call.c:552 #27 0x55d6213c7af7 in PyObject_CallFunction Objects/call.c:574 #28 0x55d621702352 in PyImport_Import Python/import.c:4000 #29 0x55d6217024bf in PyImport_ImportModule Python/import.c:3423 #30 0x55d62174882d in init_import_site Python/pylifecycle.c:2615 Indirect leak of 80 byte(s) in 1 object(s) allocated from: #0 0x7fc5fdab89cf in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:69 #1 0x55d621487a7a in _PyMem_RawMalloc Objects/obmalloc.c:63 #2 0x55d621486ef3 in _PyMem_DebugRawAlloc Objects/obmalloc.c:2872 #3 0x55d621486f57 in _PyMem_DebugRawMalloc Objects/obmalloc.c:2905 #4 0x55d6214886ab in _PyMem_DebugMalloc Objects/obmalloc.c:3070 #5 0x55d6214af46b in PyObject_Malloc Objects/obmalloc.c:1478 #6 0x55d6216dcb12 in _PyObject_MallocWithType Include/internal/pycore_object_alloc.h:46 #7 0x55d6216dcb12 in gc_alloc Python/gc.c:2288 #8 0x55d6216dcd6f in _PyObject_GC_NewVar Python/gc.c:2330 #9 0x55d6214c4f25 in tuple_alloc Objects/tupleobject.c:57 #10 0x55d6214c7aff in PyTuple_New Objects/tupleobject.c:81 #11 0x55d621737d13 in r_object Python/marshal.c:1372 #12 0x55d621737ece in r_object Python/marshal.c:1378 #13 0x55d6217389af in r_object Python/marshal.c:1554 #14 0x55d6217397de in read_object Python/marshal.c:1714 #15 0x55d62173b7db in PyMarshal_ReadObjectFromString Python/marshal.c:1833 #16 0x55d6218c11c7 in _Py_Get_Getpath_CodeObject Modules/getpath.c:835 #17 0x55d6218c12d8 in _PyConfig_InitPathConfig Modules/getpath.c:890 #18 0x55d62170affd in config_init_import Python/initconfig.c:2587 #19 0x55d621713287 in _PyConfig_InitImportConfig Python/initconfig.c:2631 #20 0x55d621750e1e in init_interp_main Python/pylifecycle.c:1199 #21 0x55d621751922 in pyinit_main Python/pylifecycle.c:1413 #22 0x55d621752be5 in Py_InitializeFromConfig Python/pylifecycle.c:1444 #23 0x55d6217baafd in pymain_init Modules/main.c:68 #24 0x55d6217baee1 in pymain_main Modules/main.c:796 #25 0x55d6217bb204 in Py_BytesMain Modules/main.c:829 #26 0x55d621262b61 in main Programs/python.c:15 #27 0x7fc5fd765249 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58 SUMMARY: AddressSanitizer: 816 byte(s) leaked in 9 allocation(s).Reacted by Shamil and Sergey Miryanov- addedinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directory
on Nov 5, 2025 I’m interested in working on this issue and investigating the leak.
Is anyone else already working on it, or made any progress?
I'll investigate and work on a fix for the
threading.stack_sizeASan leak on main/3.14+ (repro from the issue). Will open a PR once I have a clean diagnosis.- added 10 commits that reference this issue
on Sep 21, 2026
Metadata
Metadata
Assignees
Labels
3.14bugs and security fixesbugs and security fixes3.15bugs and security fixesbugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Projects
- StatusShow more project fieldsNo status
Bug report
Bug description:
LeakSanitizer output on main
CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux
Linked PRs