GeezerVison is showing github.com — gh-140306: Fix memory leaks in cross-interpreter data handling by ashm-dev · Pull Request #140307 · python/cpython
Conversation
ashm-dev
commented
Oct 18, 2025
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Fixes three memory leaks detected by LeakSanitizer in cross-interpreter operations:
_interpchannelsmodule.c: Fixed bitwise AND (&) incorrectly used instead of OR (|) when combining XID_IGNORE_EXC and XID_FREE flags
crossinterp.c (_release_xid_data): Fixed inverted ternary operator logic causing memory to be freed when it shouldn't and vice versa
crossinterp.c (_PyXI_InitFailure): Added missing PyMem_RawFree() call in error path
Reduced memory leaks from 1565 bytes to 0 bytes in test__interpchannels.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Before
Using random seed: 2825785630
0:00:00 load avg: 1.82 Run 1 test in parallel using 1 worker process
0:00:03 load avg: 1.82 [1/1/1] test__interpchannels worker non-zero exit code (Exit code 1)
[0 refs, 0 blocks]
=================================================================
==1082905==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 1088 byte(s) in 17 object(s) allocated from:
#0 0x60b0de3a54dd in calloc (/home/shamil/oss/cpython/main/python+0x9b34dd) (BuildId: 37792df6365e32052bfc7119c6be4df8fae85e76)
#1 0x60b0de96628f in _PyMem_DebugRawAlloc /home/shamil/oss/cpython/main/Objects/obmalloc.c:2884:24
#2 0x60b0deda055c in _PyXIData_New /home/shamil/oss/cpython/main/Python/crossinterp.c:309:24
#3 0x6f4afa7ba621 in channel_send /home/shamil/oss/cpython/main/./Modules/_interpchannelsmodule.c:1797:25
#4 0x6f4afa7aef84 in channelsmod_send /home/shamil/oss/cpython/main/./Modules/_interpchannelsmodule.c:3162:15
#5 0x60b0de8fec4a in cfunction_call /home/shamil/oss/cpython/main/Objects/methodobject.c:564:18
#6 0x60b0de7746be in _PyObject_MakeTpCall /home/shamil/oss/cpython/main/Objects/call.c:242:18
#7 0x60b0dec8c537 in _PyEval_EvalFrameDefault /home/shamil/oss/cpython/main/Python/generated_cases.c.h:2920:35
#8 0x60b0dec3c6b1 in _PyEval_Vector /home/shamil/oss/cpython/main/Python/ceval.c:2001:12
#9 0x60b0de784063 in _PyObject_VectorcallTstate /home/shamil/oss/cpython/main/./Include/internal/pycore_call.h:169:11
#10 0x60b0de7803dd in method_vectorcall /home/shamil/oss/cpython/main/Objects/classobject.c:95:18
#11 0x60b0de77692b in _PyVectorcall_Call /home/shamil/oss/cpython/main/Objects/call.c:273:16
#12 0x60b0dec70b70 in _PyEval_EvalFrameDefault /home/shamil/oss/cpython/main/Python/generated_cases.c.h:2616:32
#13 0x60b0dec3c6b1 in _PyEval_Vector /home/shamil/oss/cpython/main/Python/ceval.c:2001:12
#14 0x60b0de77415e in _PyObject_VectorcallDictTstate /home/shamil/oss/cpython/main/Objects/call.c:135:15
#15 0x60b0de777e2d in _PyObject_Call_Prepend /home/shamil/oss/cpython/main/Objects/call.c:504:24
#16 0x60b0de9f0fe7 in call_method /home/shamil/oss/cpython/main/Objects/typeobject.c:3076:19
#17 0x60b0de7746be in _PyObject_MakeTpCall /home/shamil/oss/cpython/main/Objects/call.c:242:18
#18 0x60b0dec51bd5 in _PyEval_EvalFrameDefault /home/shamil/oss/cpython/main/Python/generated_cases.c.h:4021:35
#19 0x60b0dec3c6b1 in _PyEval_Vector /home/shamil/oss/cpython/main/Python/ceval.c:2001:12
#20 0x60b0de784063 in _PyObject_VectorcallTstate /home/shamil/oss/cpython/main/./Include/internal/pycore_call.h:169:11
#21 0x60b0de7803dd in method_vectorcall /home/shamil/oss/cpython/main/Objects/classobject.c:95:18
#22 0x60b0de77692b in _PyVectorcall_Call /home/shamil/oss/cpython/main/Objects/call.c:273:16
#23 0x60b0dec70b70 in _PyEval_EvalFrameDefault /home/shamil/oss/cpython/main/Python/generated_cases.c.h:2616:32
#24 0x60b0dec3c6b1 in _PyEval_Vector /home/shamil/oss/cpython/main/Python/ceval.c:2001:12
#25 0x60b0de77415e in _PyObject_VectorcallDictTstate /home/shamil/oss/cpython/main/Objects/call.c:135:15
#26 0x60b0de777e2d in _PyObject_Call_Prepend /home/shamil/oss/cpython/main/Objects/call.c:504:24
#27 0x60b0de9f0fe7 in call_method /home/shamil/oss/cpython/main/Objects/typeobject.c:3076:19
#28 0x60b0de7746be in _PyObject_MakeTpCall /home/shamil/oss/cpython/main/Objects/call.c:242:18
#29 0x60b0dec51bd5 in _PyEval_EvalFrameDefault /home/shamil/oss/cpython/main/Python/generated_cases.c.h:4021:35
Direct leak of 192 byte(s) in 3 object(s) allocated from:
#0 0x60b0de3a54dd in calloc (/home/shamil/oss/cpython/main/python+0x9b34dd) (BuildId: 37792df6365e32052bfc7119c6be4df8fae85e76)
#1 0x60b0de96628f in _PyMem_DebugRawAlloc /home/shamil/oss/cpython/main/Objects/obmalloc.c:2884:24
#2 0x60b0deda055c in _PyXIData_New /home/shamil/oss/cpython/main/Python/crossinterp.c:309:24
#3 0x6f4afa7ba621 in channel_send /home/shamil/oss/cpython/main/./Modules/_interpchannelsmodule.c:1797:25
#4 0x6f4afa7aef84 in channelsmod_send /home/shamil/oss/cpython/main/./Modules/_interpchannelsmodule.c:3162:15
#5 0x60b0de8fec4a in cfunction_call /home/shamil/oss/cpython/main/Objects/methodobject.c:564:18
#6 0x60b0de7746be in _PyObject_MakeTpCall /home/shamil/oss/cpython/main/Objects/call.c:242:18
#7 0x60b0dec8c537 in _PyEval_EvalFrameDefault /home/shamil/oss/cpython/main/Python/generated_cases.c.h:2920:35
#8 0x60b0dec3c23c in _PyEval_Vector /home/shamil/oss/cpython/main/Python/ceval.c:2001:12
#9 0x60b0dec3c23c in PyEval_EvalCode /home/shamil/oss/cpython/main/Python/ceval.c:884:21
#10 0x6f4afa740195 in _run_script /home/shamil/oss/cpython/main/./Modules/_interpretersmodule.c:632:24
#11 0x6f4afa740195 in _run_in_interpreter /home/shamil/oss/cpython/main/./Modules/_interpretersmodule.c:690:15
#12 0x6f4afa73d39d in _interpreters_run_string_impl /home/shamil/oss/cpython/main/./Modules/_interpretersmodule.c:1202:15
#13 0x6f4afa73d39d in _interpreters_run_string /home/shamil/oss/cpython/main/./Modules/clinic/_interpretersmodule.c.h:531:20
#14 0x60b0de773d6e in _PyObject_VectorcallTstate /home/shamil/oss/cpython/main/./Include/internal/pycore_call.h:169:11
#15 0x60b0dec904bc in _PyEval_EvalFrameDefault /home/shamil/oss/cpython/main/Python/generated_cases.c.h:1620:35
#16 0x60b0dec3c6b1 in _PyEval_Vector /home/shamil/oss/cpython/main/Python/ceval.c:2001:12
#17 0x60b0de784063 in _PyObject_VectorcallTstate /home/shamil/oss/cpython/main/./Include/internal/pycore_call.h:169:11
#18 0x60b0de7803dd in method_vectorcall /home/shamil/oss/cpython/main/Objects/classobject.c:95:18
#19 0x60b0de77692b in _PyVectorcall_Call /home/shamil/oss/cpython/main/Objects/call.c:273:16
#20 0x60b0dec70b70 in _PyEval_EvalFrameDefault /home/shamil/oss/cpython/main/Python/generated_cases.c.h:2616:32
#21 0x60b0dec3c6b1 in _PyEval_Vector /home/shamil/oss/cpython/main/Python/ceval.c:2001:12
#22 0x60b0de77415e in _PyObject_VectorcallDictTstate /home/shamil/oss/cpython/main/Objects/call.c:135:15
#23 0x60b0de777e2d in _PyObject_Call_Prepend /home/shamil/oss/cpython/main/Objects/call.c:504:24
#24 0x60b0de9f0fe7 in call_method /home/shamil/oss/cpython/main/Objects/typeobject.c:3076:19
#25 0x60b0de7746be in _PyObject_MakeTpCall /home/shamil/oss/cpython/main/Objects/call.c:242:18
#26 0x60b0dec51bd5 in _PyEval_EvalFrameDefault /home/shamil/oss/cpython/main/Python/generated_cases.c.h:4021:35
#27 0x60b0dec3c6b1 in _PyEval_Vector /home/shamil/oss/cpython/main/Python/ceval.c:2001:12
#28 0x60b0de784063 in _PyObject_VectorcallTstate /home/shamil/oss/cpython/main/./Include/internal/pycore_call.h:169:11
#29 0x60b0de7803dd in method_vectorcall /home/shamil/oss/cpython/main/Objects/classobject.c:95:18
#30 0x60b0de77692b in _PyVectorcall_Call /home/shamil/oss/cpython/main/Objects/call.c:273:16
#31 0x60b0dec70b70 in _PyEval_EvalFrameDefault /home/shamil/oss/cpython/main/Python/generated_cases.c.h:2616:32
#32 0x60b0dec3c6b1 in _PyEval_Vector /home/shamil/oss/cpython/main/Python/ceval.c:2001:12
Direct leak of 128 byte(s) in 2 object(s) allocated from:
#0 0x60b0de3a54dd in calloc (/home/shamil/oss/cpython/main/python+0x9b34dd) (BuildId: 37792df6365e32052bfc7119c6be4df8fae85e76)
#1 0x60b0de96628f in _PyMem_DebugRawAlloc /home/shamil/oss/cpython/main/Objects/obmalloc.c:2884:24
#2 0x60b0deda055c in _PyXIData_New /home/shamil/oss/cpython/main/Python/crossinterp.c:309:24
#3 0x6f4afa7ba621 in channel_send /home/shamil/oss/cpython/main/./Modules/_interpchannelsmodule.c:1797:25
#4 0x6f4afa7b8cd2 in channel_send_wait /home/shamil/oss/cpython/main/./Modules/_interpchannelsmodule.c:1858:15
#5 0x6f4afa7aef10 in channelsmod_send /home/shamil/oss/cpython/main/./Modules/_interpchannelsmodule.c:3158:15
#6 0x60b0de8fec4a in cfunction_call /home/shamil/oss/cpython/main/Objects/methodobject.c:564:18
#7 0x60b0de7746be in _PyObject_MakeTpCall /home/shamil/oss/cpython/main/Objects/call.c:242:18
#8 0x60b0dec8c537 in _PyEval_EvalFrameDefault /home/shamil/oss/cpython/main/Python/generated_cases.c.h:2920:35
#9 0x60b0dec3c6b1 in _PyEval_Vector /home/shamil/oss/cpython/main/Python/ceval.c:2001:12
#10 0x60b0de784063 in _PyObject_VectorcallTstate /home/shamil/oss/cpython/main/./Include/internal/pycore_call.h:169:11
#11 0x60b0de7803dd in method_vectorcall /home/shamil/oss/cpython/main/Objects/classobject.c:95:18
#12 0x60b0de77692b in _PyVectorcall_Call /home/shamil/oss/cpython/main/Objects/call.c:273:16
#13 0x60b0dec70b70 in _PyEval_EvalFrameDefault /home/shamil/oss/cpython/main/Python/generated_cases.c.h:2616:32
#14 0x60b0dec3c6b1 in _PyEval_Vector /home/shamil/oss/cpython/main/Python/ceval.c:2001:12
#15 0x60b0de77415e in _PyObject_VectorcallDictTstate /home/shamil/oss/cpython/main/Objects/call.c:135:15
#16 0x60b0de777e2d in _PyObject_Call_Prepend /home/shamil/oss/cpython/main/Objects/call.c:504:24
#17 0x60b0de9f0fe7 in call_method /home/shamil/oss/cpython/main/Objects/typeobject.c:3076:19
#18 0x60b0de7746be in _PyObject_MakeTpCall /home/shamil/oss/cpython/main/Objects/call.c:242:18
#19 0x60b0dec51bd5 in _PyEval_EvalFrameDefault /home/shamil/oss/cpython/main/Python/generated_cases.c.h:4021:35
#20 0x60b0dec3c6b1 in _PyEval_Vector /home/shamil/oss/cpython/main/Python/ceval.c:2001:12
#21 0x60b0de784063 in _PyObject_VectorcallTstate /home/shamil/oss/cpython/main/./Include/internal/pycore_call.h:169:11
#22 0x60b0de7803dd in method_vectorcall /home/shamil/oss/cpython/main/Objects/classobject.c:95:18
#23 0x60b0de77692b in _PyVectorcall_Call /home/shamil/oss/cpython/main/Objects/call.c:273:16
#24 0x60b0dec70b70 in _PyEval_EvalFrameDefault /home/shamil/oss/cpython/main/Python/generated_cases.c.h:2616:32
#25 0x60b0dec3c6b1 in _PyEval_Vector /home/shamil/oss/cpython/main/Python/ceval.c:2001:12
#26 0x60b0de77415e in _PyObject_VectorcallDictTstate /home/shamil/oss/cpython/main/Objects/call.c:135:15
#27 0x60b0de777e2d in _PyObject_Call_Prepend /home/shamil/oss/cpython/main/Objects/call.c:504:24
#28 0x60b0de9f0fe7 in call_method /home/shamil/oss/cpython/main/Objects/typeobject.c:3076:19
#29 0x60b0de7746be in _PyObject_MakeTpCall /home/shamil/oss/cpython/main/Objects/call.c:242:18
Direct leak of 64 byte(s) in 1 object(s) allocated from:
#0 0x60b0de3a54dd in calloc (/home/shamil/oss/cpython/main/python+0x9b34dd) (BuildId: 37792df6365e32052bfc7119c6be4df8fae85e76)
#1 0x60b0de96628f in _PyMem_DebugRawAlloc /home/shamil/oss/cpython/main/Objects/obmalloc.c:2884:24
#2 0x60b0deda8d71 in _PyXIData_New /home/shamil/oss/cpython/main/Python/crossinterp.c:309:24
#3 0x60b0deda8d71 in _sharednsitem_set_value /home/shamil/oss/cpython/main/Python/crossinterp.c:2071:20
#4 0x60b0deda8d71 in _sharednsitem_copy_from_ns /home/shamil/oss/cpython/main/Python/crossinterp.c:2121:9
#5 0x60b0deda8d71 in _fill_sharedns /home/shamil/oss/cpython/main/Python/crossinterp.c:2385:13
#6 0x60b0deda6d7f in _PyXI_Enter /home/shamil/oss/cpython/main/Python/crossinterp.c:2639:17
#7 0x6f4afa73e4ac in _interpreters_set___main___attrs_impl /home/shamil/oss/cpython/main/./Modules/_interpretersmodule.c:1072:9
#8 0x6f4afa73e4ac in _interpreters_set___main___attrs /home/shamil/oss/cpython/main/./Modules/clinic/_interpretersmodule.c.h:339:20
#9 0x60b0de773d6e in _PyObject_VectorcallTstate /home/shamil/oss/cpython/main/./Include/internal/pycore_call.h:169:11
#10 0x60b0dec904bc in _PyEval_EvalFrameDefault /home/shamil/oss/cpython/main/Python/generated_cases.c.h:1620:35
#11 0x60b0dec3c6b1 in _PyEval_Vector /home/shamil/oss/cpython/main/Python/ceval.c:2001:12
#12 0x60b0de784063 in _PyObject_VectorcallTstate /home/shamil/oss/cpython/main/./Include/internal/pycore_call.h:169:11
#13 0x60b0de7803dd in method_vectorcall /home/shamil/oss/cpython/main/Objects/classobject.c:95:18
#14 0x60b0de77692b in _PyVectorcall_Call /home/shamil/oss/cpython/main/Objects/call.c:273:16
#15 0x60b0dec70b70 in _PyEval_EvalFrameDefault /home/shamil/oss/cpython/main/Python/generated_cases.c.h:2616:32
#16 0x60b0dec3c6b1 in _PyEval_Vector /home/shamil/oss/cpython/main/Python/ceval.c:2001:12
#17 0x60b0de77415e in _PyObject_VectorcallDictTstate /home/shamil/oss/cpython/main/Objects/call.c:135:15
#18 0x60b0de777e2d in _PyObject_Call_Prepend /home/shamil/oss/cpython/main/Objects/call.c:504:24
#19 0x60b0de9f0fe7 in call_method /home/shamil/oss/cpython/main/Objects/typeobject.c:3076:19
#20 0x60b0de7746be in _PyObject_MakeTpCall /home/shamil/oss/cpython/main/Objects/call.c:242:18
#21 0x60b0dec51bd5 in _PyEval_EvalFrameDefault /home/shamil/oss/cpython/main/Python/generated_cases.c.h:4021:35
#22 0x60b0dec3c6b1 in _PyEval_Vector /home/shamil/oss/cpython/main/Python/ceval.c:2001:12
#23 0x60b0de784063 in _PyObject_VectorcallTstate /home/shamil/oss/cpython/main/./Include/internal/pycore_call.h:169:11
#24 0x60b0de7803dd in method_vectorcall /home/shamil/oss/cpython/main/Objects/classobject.c:95:18
#25 0x60b0de77692b in _PyVectorcall_Call /home/shamil/oss/cpython/main/Objects/call.c:273:16
#26 0x60b0dec70b70 in _PyEval_EvalFrameDefault /home/shamil/oss/cpython/main/Python/generated_cases.c.h:2616:32
#27 0x60b0dec3c6b1 in _PyEval_Vector /home/shamil/oss/cpython/main/Python/ceval.c:2001:12
#28 0x60b0de77415e in _PyObject_VectorcallDictTstate /home/shamil/oss/cpython/main/Objects/call.c:135:15
#29 0x60b0de777e2d in _PyObject_Call_Prepend /home/shamil/oss/cpython/main/Objects/call.c:504:24
#30 0x60b0de9f0fe7 in call_method /home/shamil/oss/cpython/main/Objects/typeobject.c:3076:19
#31 0x60b0de7746be in _PyObject_MakeTpCall /home/shamil/oss/cpython/main/Objects/call.c:242:18
#32 0x60b0dec51bd5 in _PyEval_EvalFrameDefault /home/shamil/oss/cpython/main/Python/generated_cases.c.h:4021:35
#33 0x60b0dec3c6b1 in _PyEval_Vector /home/shamil/oss/cpython/main/Python/ceval.c:2001:12
Direct leak of 62 byte(s) in 2 object(s) allocated from:
#0 0x60b0de3a5308 in malloc (/home/shamil/oss/cpython/main/python+0x9b3308) (BuildId: 37792df6365e32052bfc7119c6be4df8fae85e76)
#1 0x60b0de966323 in _PyMem_DebugRawAlloc /home/shamil/oss/cpython/main/Objects/obmalloc.c:2887:24
#2 0x60b0deda6991 in _copy_string_obj_raw /home/shamil/oss/cpython/main/Python/crossinterp.c:1055:20
#3 0x60b0ded9be6f in _PyXI_InitFailure /home/shamil/oss/cpython/main/Python/crossinterp.c:1814:23
#4 0x6f4afa740461 in _run_script /home/shamil/oss/cpython/main/./Modules/_interpretersmodule.c
#5 0x6f4afa740461 in _run_in_interpreter /home/shamil/oss/cpython/main/./Modules/_interpretersmodule.c:690:15
#6 0x6f4afa73d39d in _interpreters_run_string_impl /home/shamil/oss/cpython/main/./Modules/_interpretersmodule.c:1202:15
#7 0x6f4afa73d39d in _interpreters_run_string /home/shamil/oss/cpython/main/./Modules/clinic/_interpretersmodule.c.h:531:20
#8 0x60b0de773d6e in _PyObject_VectorcallTstate /home/shamil/oss/cpython/main/./Include/internal/pycore_call.h:169:11
#9 0x60b0dec904bc in _PyEval_EvalFrameDefault /home/shamil/oss/cpython/main/Python/generated_cases.c.h:1620:35
#10 0x60b0dec3c6b1 in _PyEval_Vector /home/shamil/oss/cpython/main/Python/ceval.c:2001:12
#11 0x60b0de784063 in _PyObject_VectorcallTstate /home/shamil/oss/cpython/main/./Include/internal/pycore_call.h:169:11
#12 0x60b0de7803dd in method_vectorcall /home/shamil/oss/cpython/main/Objects/classobject.c:95:18
#13 0x60b0de77692b in _PyVectorcall_Call /home/shamil/oss/cpython/main/Objects/call.c:273:16
#14 0x60b0dec70b70 in _PyEval_EvalFrameDefault /home/shamil/oss/cpython/main/Python/generated_cases.c.h:2616:32
#15 0x60b0dec3c6b1 in _PyEval_Vector /home/shamil/oss/cpython/main/Python/ceval.c:2001:12
#16 0x60b0de77415e in _PyObject_VectorcallDictTstate /home/shamil/oss/cpython/main/Objects/call.c:135:15
#17 0x60b0de777e2d in _PyObject_Call_Prepend /home/shamil/oss/cpython/main/Objects/call.c:504:24
#18 0x60b0de9f0fe7 in call_method /home/shamil/oss/cpython/main/Objects/typeobject.c:3076:19
#19 0x60b0de7746be in _PyObject_MakeTpCall /home/shamil/oss/cpython/main/Objects/call.c:242:18
#20 0x60b0dec51bd5 in _PyEval_EvalFrameDefault /home/shamil/oss/cpython/main/Python/generated_cases.c.h:4021:35
#21 0x60b0dec3c6b1 in _PyEval_Vector /home/shamil/oss/cpython/main/Python/ceval.c:2001:12
#22 0x60b0de784063 in _PyObject_VectorcallTstate /home/shamil/oss/cpython/main/./Include/internal/pycore_call.h:169:11
#23 0x60b0de7803dd in method_vectorcall /home/shamil/oss/cpython/main/Objects/classobject.c:95:18
#24 0x60b0de77692b in _PyVectorcall_Call /home/shamil/oss/cpython/main/Objects/call.c:273:16
#25 0x60b0dec70b70 in _PyEval_EvalFrameDefault /home/shamil/oss/cpython/main/Python/generated_cases.c.h:2616:32
#26 0x60b0dec3c6b1 in _PyEval_Vector /home/shamil/oss/cpython/main/Python/ceval.c:2001:12
#27 0x60b0de77415e in _PyObject_VectorcallDictTstate /home/shamil/oss/cpython/main/Objects/call.c:135:15
#28 0x60b0de777e2d in _PyObject_Call_Prepend /home/shamil/oss/cpython/main/Objects/call.c:504:24
#29 0x60b0de9f0fe7 in call_method /home/shamil/oss/cpython/main/Objects/typeobject.c:3076:19
#30 0x60b0de7746be in _PyObject_MakeTpCall /home/shamil/oss/cpython/main/Objects/call.c:242:18
#31 0x60b0dec51bd5 in _PyEval_EvalFrameDefault /home/shamil/oss/cpython/main/Python/generated_cases.c.h:4021:35
Direct leak of 31 byte(s) in 1 object(s) allocated from:
#0 0x60b0de3a5308 in malloc (/home/shamil/oss/cpython/main/python+0x9b3308) (BuildId: 37792df6365e32052bfc7119c6be4df8fae85e76)
#1 0x60b0de966323 in _PyMem_DebugRawAlloc /home/shamil/oss/cpython/main/Objects/obmalloc.c:2887:24
#2 0x60b0deda6991 in _copy_string_obj_raw /home/shamil/oss/cpython/main/Python/crossinterp.c:1055:20
#3 0x60b0ded9be6f in _PyXI_InitFailure /home/shamil/oss/cpython/main/Python/crossinterp.c:1814:23
#4 0x6f4afa740461 in _run_script /home/shamil/oss/cpython/main/./Modules/_interpretersmodule.c
#5 0x6f4afa740461 in _run_in_interpreter /home/shamil/oss/cpython/main/./Modules/_interpretersmodule.c:690:15
#6 0x6f4afa73d39d in _interpreters_run_string_impl /home/shamil/oss/cpython/main/./Modules/_interpretersmodule.c:1202:15
#7 0x6f4afa73d39d in _interpreters_run_string /home/shamil/oss/cpython/main/./Modules/clinic/_interpretersmodule.c.h:531:20
#8 0x60b0dec6bbcf in _PyEval_EvalFrameDefault /home/shamil/oss/cpython/main/Python/generated_cases.c.h:2361:35
#9 0x60b0dec3c6b1 in _PyEval_Vector /home/shamil/oss/cpython/main/Python/ceval.c:2001:12
#10 0x60b0de784063 in _PyObject_VectorcallTstate /home/shamil/oss/cpython/main/./Include/internal/pycore_call.h:169:11
#11 0x60b0de7803dd in method_vectorcall /home/shamil/oss/cpython/main/Objects/classobject.c:95:18
#12 0x60b0de77692b in _PyVectorcall_Call /home/shamil/oss/cpython/main/Objects/call.c:273:16
#13 0x60b0dec70b70 in _PyEval_EvalFrameDefault /home/shamil/oss/cpython/main/Python/generated_cases.c.h:2616:32
#14 0x60b0dec3c6b1 in _PyEval_Vector /home/shamil/oss/cpython/main/Python/ceval.c:2001:12
#15 0x60b0de77415e in _PyObject_VectorcallDictTstate /home/shamil/oss/cpython/main/Objects/call.c:135:15
#16 0x60b0de777e2d in _PyObject_Call_Prepend /home/shamil/oss/cpython/main/Objects/call.c:504:24
#17 0x60b0de9f0fe7 in call_method /home/shamil/oss/cpython/main/Objects/typeobject.c:3076:19
#18 0x60b0de7746be in _PyObject_MakeTpCall /home/shamil/oss/cpython/main/Objects/call.c:242:18
#19 0x60b0dec51bd5 in _PyEval_EvalFrameDefault /home/shamil/oss/cpython/main/Python/generated_cases.c.h:4021:35
#20 0x60b0dec3c6b1 in _PyEval_Vector /home/shamil/oss/cpython/main/Python/ceval.c:2001:12
#21 0x60b0de784063 in _PyObject_VectorcallTstate /home/shamil/oss/cpython/main/./Include/internal/pycore_call.h:169:11
#22 0x60b0de7803dd in method_vectorcall /home/shamil/oss/cpython/main/Objects/classobject.c:95:18
#23 0x60b0de77692b in _PyVectorcall_Call /home/shamil/oss/cpython/main/Objects/call.c:273:16
#24 0x60b0dec70b70 in _PyEval_EvalFrameDefault /home/shamil/oss/cpython/main/Python/generated_cases.c.h:2616:32
#25 0x60b0dec3c6b1 in _PyEval_Vector /home/shamil/oss/cpython/main/Python/ceval.c:2001:12
#26 0x60b0de77415e in _PyObject_VectorcallDictTstate /home/shamil/oss/cpython/main/Objects/call.c:135:15
#27 0x60b0de777e2d in _PyObject_Call_Prepend /home/shamil/oss/cpython/main/Objects/call.c:504:24
#28 0x60b0de9f0fe7 in call_method /home/shamil/oss/cpython/main/Objects/typeobject.c:3076:19
#29 0x60b0de7746be in _PyObject_MakeTpCall /home/shamil/oss/cpython/main/Objects/call.c:242:18
#30 0x60b0dec51bd5 in _PyEval_EvalFrameDefault /home/shamil/oss/cpython/main/Python/generated_cases.c.h:4021:35
#31 0x60b0dec3c6b1 in _PyEval_Vector /home/shamil/oss/cpython/main/Python/ceval.c:2001:12
SUMMARY: AddressSanitizer: 1565 byte(s) leaked in 26 allocation(s).
== Tests result: FAILURE ==
1 test failed:
test__interpchannels
Total duration: 3.2 sec
Total tests: run=0
Total test files: run=1/1 failed=1
Result: FAILURE
[0 refs, 0 blocks]
After
Using random seed: 1634876683
0:00:00 load avg: 6.85 Run 1 test in parallel using 1 worker process
0:00:03 load avg: 6.54 [1/1] test__interpchannels passed
[0 refs, 0 blocks]
== Tests result: SUCCESS ==
1 test OK.
Total duration: 3.6 sec
Total tests: run=70 skipped=5
Total test files: run=1/1
Result: SUCCESS
[0 refs, 0 blocks]
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
I've also found similar bug in Modules/_interpqueuesmodule.c. Expression XID_IGNORE_EXC & XID_FREE is used there.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
I've also found similar bug in Modules/_interpqueuesmodule.c. Expression XID_IGNORE_EXC & XID_FREE is used there.
Each variant needs to be carefully checked there, because some are correct and some aren't. I didn't look at the others because there were no leaks there :)
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
I think there're leaks there, you can find them with test.test_interpreters.
But we can fix them in a separate PR.
Those 3 fixes which is already here LGTM.
|
ashm-dev reacted with thumbs up emoji
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
|
XID_IGNORE_EXC & XID_FREE is never correct. It is simply 0.
|
efimov-mikhail and ashm-dev reacted with thumbs up emoji
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And please fix all other occurrences of XID_IGNORE_EXC & XID_FREE if there are any.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
And please fix all other occurrences of XID_IGNORE_EXC & XID_FREE if there are any.
There are no more such places in the code.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
ashm-dev reacted with thumbs up emoji
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Sorry, @ashm-dev and @serhiy-storchaka, I could not cleanly backport this to 3.13 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker f9323213c98c9f1f7f3bf5af883b73047432fe50 3.13
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Sorry @ashm-dev and @serhiy-storchaka, I had trouble completing the backport.
Please retry by removing and re-adding the "needs backport to 3.14" label.
Please backport backport using cherry_picker on the command line.
cherry_picker f9323213c98c9f1f7f3bf5af883b73047432fe50 3.14
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Reviewers
ericsnowcurrently
Awaiting requested review from ericsnowcurrently
ericsnowcurrently is a code owner
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|