René's URL Explorer Experiment


Title: Possible `heap-use-after-free` in ctypes in Python 3.12 · Issue #113576 · python/cpython · GitHub

Open Graph Title: Possible `heap-use-after-free` in ctypes in Python 3.12 · Issue #113576 · python/cpython

X Title: Possible `heap-use-after-free` in ctypes in Python 3.12 · Issue #113576 · python/cpython

Description: Crash report What happened? I have a binary which is embedding python. I want to test this binary with address sanitizer, and leak sanitizer. Regular python3.12 build contained in Fedora 39 causes lsan to report leaks even with PYTHONMAL...

Open Graph Description: Crash report What happened? I have a binary which is embedding python. I want to test this binary with address sanitizer, and leak sanitizer. Regular python3.12 build contained in Fedora 39 causes ...

X Description: Crash report What happened? I have a binary which is embedding python. I want to test this binary with address sanitizer, and leak sanitizer. Regular python3.12 build contained in Fedora 39 causes ...

Opengraph URL: https://github.com/python/cpython/issues/113576

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Possible `heap-use-after-free` in ctypes in Python 3.12","articleBody":"# Crash report\r\n\r\n### What happened?\r\n\r\nI have a binary which is embedding python. I want to test this binary with address sanitizer, and leak sanitizer. Regular python3.12 build contained in Fedora 39 causes lsan to report leaks even with `PYTHONMALLOC=malloc_debug`, which with previous versions gave me clean run.\r\n\r\nTherefore, I tried `python3-debug`, which is a debug build of python packaged in Fedora. With that, I hit\r\n\r\n* https://github.com/python/cpython/issues/111339\r\n\r\nand I was playing around a bit. When I hit the mentioned issue, I was using PYTHONMALLOC=\"malloc_debug\". I wanted to try other values for this variable. With `pymalloc_debug`, I got the same assertion.\r\n\r\nWith `malloc`, I got\r\n\r\n```\r\n=================================================================\r\n==1716614==ERROR: AddressSanitizer: heap-use-after-free on address 0x6040000aba78 at pc 0x7f2ba546eb32 bp 0x7f2b9e24e520 sp 0x7f2b9e24dce0\r\nREAD of size 3 at 0x6040000aba78 thread T4\r\n    #0 0x7f2ba546eb31 in __interceptor_memcpy (/lib64/libasan.so.8+0x6eb31) (BuildId: 7fcb7759bc17ef47f9682414b6d99732d6a6ab0c)\r\n    #1 0x7f2ba4cd6d8a in _copy_characters (/lib64/libpython3.12d.so.1.0+0x2d6d8a) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #2 0x7f2ba4cd7831 in _PyUnicode_FastCopyCharacters (/lib64/libpython3.12d.so.1.0+0x2d7831) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #3 0x7f2ba4cf54ef in PyUnicode_Concat (/lib64/libpython3.12d.so.1.0+0x2f54ef) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #4 0x7f2ba0a44b51 in CreateSwappedType (/usr/lib64/python3.12/lib-dynload/_ctypes.cpython-312d-x86_64-linux-gnu.so+0xcb51) (BuildId: cdb5a61ddd026358017a72a3d3405dd431e31b72)\r\n    #5 0x7f2ba0a4552c in PyCSimpleType_new (/usr/lib64/python3.12/lib-dynload/_ctypes.cpython-312d-x86_64-linux-gnu.so+0xd52c) (BuildId: cdb5a61ddd026358017a72a3d3405dd431e31b72)\r\n    #6 0x7f2ba4c958c3 in type_call (/lib64/libpython3.12d.so.1.0+0x2958c3) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #7 0x7f2ba4bf8792 in _PyObject_MakeTpCall (/lib64/libpython3.12d.so.1.0+0x1f8792) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #8 0x7f2ba4bf825c in _PyObject_FastCallDictTstate (/lib64/libpython3.12d.so.1.0+0x1f825c) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #9 0x7f2ba4bf8389 in PyObject_VectorcallDict (/lib64/libpython3.12d.so.1.0+0x1f8389) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #10 0x7f2ba4d5afd1 in builtin___build_class__ (/lib64/libpython3.12d.so.1.0+0x35afd1) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #11 0x7f2ba4c6df9a in cfunction_vectorcall_FASTCALL_KEYWORDS (/lib64/libpython3.12d.so.1.0+0x26df9a) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #12 0x7f2ba4bf7c81 in _PyObject_VectorcallTstate.lto_priv.3 (/lib64/libpython3.12d.so.1.0+0x1f7c81) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #13 0x7f2ba4bf8b98 in PyObject_Vectorcall (/lib64/libpython3.12d.so.1.0+0x1f8b98) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #14 0x7f2ba4d7b662 in _PyEval_EvalFrameDefault (/lib64/libpython3.12d.so.1.0+0x37b662) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #15 0x7f2ba4d61f81 in _PyEval_EvalFrame.lto_priv.1 (/lib64/libpython3.12d.so.1.0+0x361f81) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #16 0x7f2ba4d86a6c in _PyEval_Vector (/lib64/libpython3.12d.so.1.0+0x386a6c) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #17 0x7f2ba4d63933 in PyEval_EvalCode (/lib64/libpython3.12d.so.1.0+0x363933) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #18 0x7f2ba4d5c678 in builtin_exec_impl (/lib64/libpython3.12d.so.1.0+0x35c678) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #19 0x7f2ba4d59a3a in builtin_exec (/lib64/libpython3.12d.so.1.0+0x359a3a) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #20 0x7f2ba4c6df9a in cfunction_vectorcall_FASTCALL_KEYWORDS (/lib64/libpython3.12d.so.1.0+0x26df9a) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #21 0x7f2ba4bf8909 in _PyVectorcall_Call (/lib64/libpython3.12d.so.1.0+0x1f8909) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #22 0x7f2ba4bf8cf1 in _PyObject_Call (/lib64/libpython3.12d.so.1.0+0x1f8cf1) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #23 0x7f2ba4bf8dcc in PyObject_Call (/lib64/libpython3.12d.so.1.0+0x1f8dcc) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #24 0x7f2ba4d814dc in _PyEval_EvalFrameDefault (/lib64/libpython3.12d.so.1.0+0x3814dc) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #25 0x7f2ba4d61f81 in _PyEval_EvalFrame.lto_priv.1 (/lib64/libpython3.12d.so.1.0+0x361f81) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #26 0x7f2ba4d86a6c in _PyEval_Vector (/lib64/libpython3.12d.so.1.0+0x386a6c) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #27 0x7f2ba4bf8fdd in _PyFunction_Vectorcall (/lib64/libpython3.12d.so.1.0+0x1f8fdd) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #28 0x7f2ba4bf7c81 in _PyObject_VectorcallTstate.lto_priv.3 (/lib64/libpython3.12d.so.1.0+0x1f7c81) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #29 0x7f2ba4bfa545 in object_vacall (/lib64/libpython3.12d.so.1.0+0x1fa545) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #30 0x7f2ba4bfa84a in PyObject_CallMethodObjArgs (/lib64/libpython3.12d.so.1.0+0x1fa84a) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #31 0x7f2ba4ddba6b in import_find_and_load (/lib64/libpython3.12d.so.1.0+0x3dba6b) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #32 0x7f2ba4ddbdb8 in PyImport_ImportModuleLevelObject (/lib64/libpython3.12d.so.1.0+0x3dbdb8) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #33 0x7f2ba4d88907 in import_name (/lib64/libpython3.12d.so.1.0+0x388907) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #34 0x7f2ba4d76e96 in _PyEval_EvalFrameDefault (/lib64/libpython3.12d.so.1.0+0x376e96) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #35 0x7f2ba4d61f81 in _PyEval_EvalFrame.lto_priv.1 (/lib64/libpython3.12d.so.1.0+0x361f81) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #36 0x7f2ba4d86a6c in _PyEval_Vector (/lib64/libpython3.12d.so.1.0+0x386a6c) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #37 0x7f2ba4d63933 in PyEval_EvalCode (/lib64/libpython3.12d.so.1.0+0x363933) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #38 0x7f2ba4d5c678 in builtin_exec_impl (/lib64/libpython3.12d.so.1.0+0x35c678) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #39 0x7f2ba4d59a3a in builtin_exec (/lib64/libpython3.12d.so.1.0+0x359a3a) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #40 0x7f2ba4c6df9a in cfunction_vectorcall_FASTCALL_KEYWORDS (/lib64/libpython3.12d.so.1.0+0x26df9a) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #41 0x7f2ba4bf8909 in _PyVectorcall_Call (/lib64/libpython3.12d.so.1.0+0x1f8909) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #42 0x7f2ba4bf8cf1 in _PyObject_Call (/lib64/libpython3.12d.so.1.0+0x1f8cf1) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #43 0x7f2ba4bf8dcc in PyObject_Call (/lib64/libpython3.12d.so.1.0+0x1f8dcc) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #44 0x7f2ba4d814dc in _PyEval_EvalFrameDefault (/lib64/libpython3.12d.so.1.0+0x3814dc) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #45 0x7f2ba4d61f81 in _PyEval_EvalFrame.lto_priv.1 (/lib64/libpython3.12d.so.1.0+0x361f81) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #46 0x7f2ba4d86a6c in _PyEval_Vector (/lib64/libpython3.12d.so.1.0+0x386a6c) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #47 0x7f2ba4bf8fdd in _PyFunction_Vectorcall (/lib64/libpython3.12d.so.1.0+0x1f8fdd) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #48 0x7f2ba4bf7c81 in _PyObject_VectorcallTstate.lto_priv.3 (/lib64/libpython3.12d.so.1.0+0x1f7c81) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #49 0x7f2ba4bfa545 in object_vacall (/lib64/libpython3.12d.so.1.0+0x1fa545) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #50 0x7f2ba4bfa84a in PyObject_CallMethodObjArgs (/lib64/libpython3.12d.so.1.0+0x1fa84a) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #51 0x7f2ba4ddba6b in import_find_and_load (/lib64/libpython3.12d.so.1.0+0x3dba6b) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #52 0x7f2ba4ddbdb8 in PyImport_ImportModuleLevelObject (/lib64/libpython3.12d.so.1.0+0x3dbdb8) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #53 0x7f2ba4d5b1ee in builtin___import___impl (/lib64/libpython3.12d.so.1.0+0x35b1ee) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #54 0x7f2ba4d591d8 in builtin___import__ (/lib64/libpython3.12d.so.1.0+0x3591d8) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #55 0x7f2ba4c6df9a in cfunction_vectorcall_FASTCALL_KEYWORDS (/lib64/libpython3.12d.so.1.0+0x26df9a) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #56 0x7f2ba4bf7c81 in _PyObject_VectorcallTstate.lto_priv.3 (/lib64/libpython3.12d.so.1.0+0x1f7c81) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #57 0x7f2ba4bf9595 in _PyObject_CallFunctionVa (/lib64/libpython3.12d.so.1.0+0x1f9595) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #58 0x7f2ba4bf96e5 in PyObject_CallFunction (/lib64/libpython3.12d.so.1.0+0x1f96e5) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #59 0x7f2ba4ddc3f5 in PyImport_Import (/lib64/libpython3.12d.so.1.0+0x3dc3f5) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #60 0x7f2ba4ddae85 in PyImport_ImportModule (/lib64/libpython3.12d.so.1.0+0x3dae85) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #61 0x5e5700 in qd_python_setup /home/jdanek/repos/skupper-router/src/python_embedded.c:841\r\n    #62 0x57b5a0 in qd_python_initialize /home/jdanek/repos/skupper-router/src/python_embedded.c:58\r\n    #63 0x57b5a0 in qd_dispatch /home/jdanek/repos/skupper-router/src/dispatch.c:137\r\n    #64 0x7b19ef in QDR::initialize(std::__cxx11::basic_string\u003cchar, std::char_traits\u003cchar\u003e, std::allocator\u003cchar\u003e \u003e const\u0026) /home/jdanek/repos/skupper-router/tests/c_unittests/helpers.hpp:206\r\n    #65 0x8974bc in operator() /home/jdanek/repos/skupper-router/tests/c_unittests/test_http_listener_connector.cpp:67\r\n    #66 0x7f2ba3ee31e2 in execute_native_thread_routine (/lib64/libstdc++.so.6+0xe31e2) (BuildId: 43b5fe9c4fe0185772be4b57539be137c14a5c05)\r\n    #67 0x7f2ba3cac896 in start_thread (/lib64/libc.so.6+0x8e896) (BuildId: 788cdd41a15985bf8e0a48d213a46e07d58822df)\r\n    #68 0x7f2ba3d336fb in clone3 (/lib64/libc.so.6+0x1156fb) (BuildId: 788cdd41a15985bf8e0a48d213a46e07d58822df)\r\n\r\n0x6040000aba78 is located 40 bytes inside of 44-byte region [0x6040000aba50,0x6040000aba7c)\r\nfreed by thread T1 here:\r\n    #0 0x7f2ba54d7fb8 in __interceptor_free.part.0 (/lib64/libasan.so.8+0xd7fb8) (BuildId: 7fcb7759bc17ef47f9682414b6d99732d6a6ab0c)\r\n    #1 0x7f2ba4c77b26 in _PyMem_RawFree (/lib64/libpython3.12d.so.1.0+0x277b26) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #2 0x7f2ba4c792a2 in PyObject_Free (/lib64/libpython3.12d.so.1.0+0x2792a2) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #3 0x7f2ba4cd7dcf in unicode_dealloc (/lib64/libpython3.12d.so.1.0+0x2d7dcf) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #4 0x7f2ba4c7778a in _Py_Dealloc (/lib64/libpython3.12d.so.1.0+0x27778a) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #5 0x7f2ba4c50b77 in Py_DECREF.lto_priv.27 (/lib64/libpython3.12d.so.1.0+0x250b77) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #6 0x7f2ba4c50bcc in Py_XDECREF.lto_priv.25 (/lib64/libpython3.12d.so.1.0+0x250bcc) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #7 0x7f2ba4c533c8 in free_keys_object (/lib64/libpython3.12d.so.1.0+0x2533c8) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #8 0x7f2ba4c524ca in dictkeys_decref (/lib64/libpython3.12d.so.1.0+0x2524ca) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #9 0x7f2ba4c575ba in PyDict_Clear (/lib64/libpython3.12d.so.1.0+0x2575ba) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #10 0x7f2ba4cc4c93 in clear_interned_dict (/lib64/libpython3.12d.so.1.0+0x2c4c93) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #11 0x7f2ba4d0136c in _PyUnicode_ClearInterned (/lib64/libpython3.12d.so.1.0+0x30136c) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #12 0x7f2ba4e0da25 in finalize_interp_types (/lib64/libpython3.12d.so.1.0+0x40da25) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #13 0x7f2ba4e0db0c in finalize_interp_clear (/lib64/libpython3.12d.so.1.0+0x40db0c) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #14 0x7f2ba4e0dc99 in Py_FinalizeEx (/lib64/libpython3.12d.so.1.0+0x40dc99) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #15 0x7f2ba4e0dd07 in Py_Finalize (/lib64/libpython3.12d.so.1.0+0x40dd07) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #16 0x5ccdb0 in qd_python_finalize /home/jdanek/repos/skupper-router/src/python_embedded.c:71\r\n    #17 0x57ac8a in qd_dispatch_free /home/jdanek/repos/skupper-router/src/dispatch.c:394\r\n    #18 0x879f06 in qd_dispatch_free /home/jdanek/repos/skupper-router/src/dispatch.c:374\r\n    #19 0x879f06 in QDR::deinitialize(bool) const [clone .constprop.0] /home/jdanek/repos/skupper-router/tests/c_unittests/helpers.hpp:264\r\n    #20 0x8a95be in operator() /home/jdanek/repos/skupper-router/tests/c_unittests/test_connection_manager_static.cpp:131\r\n    #21 0x7f2ba3ee31e2 in execute_native_thread_routine (/lib64/libstdc++.so.6+0xe31e2) (BuildId: 43b5fe9c4fe0185772be4b57539be137c14a5c05)\r\n\r\npreviously allocated by thread T1 here:\r\n    #0 0x7f2ba54d92ef in malloc (/lib64/libasan.so.8+0xd92ef) (BuildId: 7fcb7759bc17ef47f9682414b6d99732d6a6ab0c)\r\n    #1 0x7f2ba4c77a7d in _PyMem_RawMalloc (/lib64/libpython3.12d.so.1.0+0x277a7d) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #2 0x7f2ba4c791ab in PyObject_Malloc (/lib64/libpython3.12d.so.1.0+0x2791ab) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #3 0x7f2ba4cd6550 in PyUnicode_New (/lib64/libpython3.12d.so.1.0+0x2d6550) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #4 0x7f2ba4ce4c72 in unicode_decode_utf8 (/lib64/libpython3.12d.so.1.0+0x2e4c72) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #5 0x7f2ba4ce523f in PyUnicode_DecodeUTF8Stateful (/lib64/libpython3.12d.so.1.0+0x2e523f) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #6 0x7f2ba4cd8da1 in PyUnicode_FromString (/lib64/libpython3.12d.so.1.0+0x2d8da1) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #7 0x7f2ba4d01125 in PyUnicode_InternFromString (/lib64/libpython3.12d.so.1.0+0x301125) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #8 0x7f2ba0a44b03 in CreateSwappedType (/usr/lib64/python3.12/lib-dynload/_ctypes.cpython-312d-x86_64-linux-gnu.so+0xcb03) (BuildId: cdb5a61ddd026358017a72a3d3405dd431e31b72)\r\n    #9 0x7f2ba0a4552c in PyCSimpleType_new (/usr/lib64/python3.12/lib-dynload/_ctypes.cpython-312d-x86_64-linux-gnu.so+0xd52c) (BuildId: cdb5a61ddd026358017a72a3d3405dd431e31b72)\r\n    #10 0x7f2ba4c958c3 in type_call (/lib64/libpython3.12d.so.1.0+0x2958c3) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #11 0x7f2ba4bf8792 in _PyObject_MakeTpCall (/lib64/libpython3.12d.so.1.0+0x1f8792) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #12 0x7f2ba4bf825c in _PyObject_FastCallDictTstate (/lib64/libpython3.12d.so.1.0+0x1f825c) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #13 0x7f2ba4bf8389 in PyObject_VectorcallDict (/lib64/libpython3.12d.so.1.0+0x1f8389) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #14 0x7f2ba4d5afd1 in builtin___build_class__ (/lib64/libpython3.12d.so.1.0+0x35afd1) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #15 0x7f2ba4c6df9a in cfunction_vectorcall_FASTCALL_KEYWORDS (/lib64/libpython3.12d.so.1.0+0x26df9a) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #16 0x7f2ba4bf7c81 in _PyObject_VectorcallTstate.lto_priv.3 (/lib64/libpython3.12d.so.1.0+0x1f7c81) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #17 0x7f2ba4bf8b98 in PyObject_Vectorcall (/lib64/libpython3.12d.so.1.0+0x1f8b98) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #18 0x7f2ba4d7b662 in _PyEval_EvalFrameDefault (/lib64/libpython3.12d.so.1.0+0x37b662) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #19 0x7f2ba4d61f81 in _PyEval_EvalFrame.lto_priv.1 (/lib64/libpython3.12d.so.1.0+0x361f81) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #20 0x7f2ba4d86a6c in _PyEval_Vector (/lib64/libpython3.12d.so.1.0+0x386a6c) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #21 0x7f2ba4d63933 in PyEval_EvalCode (/lib64/libpython3.12d.so.1.0+0x363933) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #22 0x7f2ba4d5c678 in builtin_exec_impl (/lib64/libpython3.12d.so.1.0+0x35c678) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #23 0x7f2ba4d59a3a in builtin_exec (/lib64/libpython3.12d.so.1.0+0x359a3a) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #24 0x7f2ba4c6df9a in cfunction_vectorcall_FASTCALL_KEYWORDS (/lib64/libpython3.12d.so.1.0+0x26df9a) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #25 0x7f2ba4bf8909 in _PyVectorcall_Call (/lib64/libpython3.12d.so.1.0+0x1f8909) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #26 0x7f2ba4bf8cf1 in _PyObject_Call (/lib64/libpython3.12d.so.1.0+0x1f8cf1) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #27 0x7f2ba4bf8dcc in PyObject_Call (/lib64/libpython3.12d.so.1.0+0x1f8dcc) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #28 0x7f2ba4d814dc in _PyEval_EvalFrameDefault (/lib64/libpython3.12d.so.1.0+0x3814dc) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #29 0x7f2ba4d61f81 in _PyEval_EvalFrame.lto_priv.1 (/lib64/libpython3.12d.so.1.0+0x361f81) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n\r\nThread T4 created by T0 here:\r\n    #0 0x7f2ba5448956 in pthread_create (/lib64/libasan.so.8+0x48956) (BuildId: 7fcb7759bc17ef47f9682414b6d99732d6a6ab0c)\r\n    #1 0x7f2ba3ee32b8 in std::thread::_M_start_thread(std::unique_ptr\u003cstd::thread::_State, std::default_delete\u003cstd::thread::_State\u003e \u003e, void (*)()) (/lib64/libstdc++.so.6+0xe32b8) (BuildId: 43b5fe9c4fe0185772be4b57539be137c14a5c05)\r\n    #2 0x7ca08e in DOCTEST_ANON_FUNC_29 /home/jdanek/repos/skupper-router/tests/c_unittests/test_http_listener_connector.cpp:65\r\n    #3 0x78a350 in doctest::Context::run() /home/jdanek/repos/skupper-router/tests/c_unittests/doctest.h:7007\r\n    #4 0x456aad in main /home/jdanek/repos/skupper-router/tests/c_unittests/c_unittests_main.cpp:76\r\n    #5 0x7f2ba3c46149 in __libc_start_call_main (/lib64/libc.so.6+0x28149) (BuildId: 788cdd41a15985bf8e0a48d213a46e07d58822df)\r\n    #6 0x7f2ba3c4620a in __libc_start_main_impl (/lib64/libc.so.6+0x2820a) (BuildId: 788cdd41a15985bf8e0a48d213a46e07d58822df)\r\n    #7 0x45c874 in _start (/home/jdanek/repos/skupper-router/cmake-build-relwithdebinfo-asan/tests/c_unittests/c_unittests+0x45c874) (BuildId: 7638f1da81a091da1a78ee3ba7675e8ad027ba1d)\r\n\r\nThread T1 created by T0 here:\r\n    #0 0x7f2ba5448956 in pthread_create (/lib64/libasan.so.8+0x48956) (BuildId: 7fcb7759bc17ef47f9682414b6d99732d6a6ab0c)\r\n    #1 0x7f2ba3ee32b8 in std::thread::_M_start_thread(std::unique_ptr\u003cstd::thread::_State, std::default_delete\u003cstd::thread::_State\u003e \u003e, void (*)()) (/lib64/libstdc++.so.6+0xe32b8) (BuildId: 43b5fe9c4fe0185772be4b57539be137c14a5c05)\r\n    #2 0x7c9dde in DOCTEST_ANON_FUNC_26 /home/jdanek/repos/skupper-router/tests/c_unittests/test_connection_manager_static.cpp:71\r\n    #3 0x78a350 in doctest::Context::run() /home/jdanek/repos/skupper-router/tests/c_unittests/doctest.h:7007\r\n    #4 0x456aad in main /home/jdanek/repos/skupper-router/tests/c_unittests/c_unittests_main.cpp:76\r\n    #5 0x7f2ba3c46149 in __libc_start_call_main (/lib64/libc.so.6+0x28149) (BuildId: 788cdd41a15985bf8e0a48d213a46e07d58822df)\r\n    #6 0x7f2ba3c4620a in __libc_start_main_impl (/lib64/libc.so.6+0x2820a) (BuildId: 788cdd41a15985bf8e0a48d213a46e07d58822df)\r\n    #7 0x45c874 in _start (/home/jdanek/repos/skupper-router/cmake-build-relwithdebinfo-asan/tests/c_unittests/c_unittests+0x45c874) (BuildId: 7638f1da81a091da1a78ee3ba7675e8ad027ba1d)\r\n\r\nSUMMARY: AddressSanitizer: heap-use-after-free (/lib64/libasan.so.8+0x6eb31) (BuildId: 7fcb7759bc17ef47f9682414b6d99732d6a6ab0c) in __interceptor_memcpy\r\nShadow bytes around the buggy address:\r\n  0x6040000ab780: fa fa fd fd fd fd fd fd fa fa fd fd fd fd fd fd\r\n  0x6040000ab800: fa fa 00 00 00 00 00 00 fa fa fd fd fd fd fd fd\r\n  0x6040000ab880: fa fa 00 00 00 00 00 00 fa fa 00 00 00 00 00 00\r\n  0x6040000ab900: fa fa 00 00 00 00 00 07 fa fa 00 00 00 00 00 00\r\n  0x6040000ab980: fa fa 00 00 00 00 00 06 fa fa fd fd fd fd fd fd\r\n=\u003e0x6040000aba00: fa fa 00 00 00 00 00 fa fa fa fd fd fd fd fd[fd]\r\n  0x6040000aba80: fa fa fd fd fd fd fd fd fa fa fd fd fd fd fd fd\r\n  0x6040000abb00: fa fa 00 00 00 00 00 00 fa fa 00 00 00 00 00 00\r\n  0x6040000abb80: fa fa 00 00 00 00 00 00 fa fa 00 00 00 00 00 00\r\n  0x6040000abc00: fa fa 00 00 00 00 00 00 fa fa 00 00 00 00 00 00\r\n  0x6040000abc80: fa fa 00 00 00 00 00 00 fa fa 00 00 00 00 00 00\r\nShadow byte legend (one shadow byte represents 8 application bytes):\r\n  Addressable:           00\r\n  Partially addressable: 01 02 03 04 05 06 07 \r\n  Heap left redzone:       fa\r\n  Freed heap region:       fd\r\n  Stack left redzone:      f1\r\n  Stack mid redzone:       f2\r\n  Stack right redzone:     f3\r\n  Stack after return:      f5\r\n  Stack use after scope:   f8\r\n  Global redzone:          f9\r\n  Global init order:       f6\r\n  Poisoned by user:        f7\r\n  Container overflow:      fc\r\n  Array cookie:            ac\r\n  Intra object redzone:    bb\r\n  ASan internal:           fe\r\n  Left alloca redzone:     ca\r\n  Right alloca redzone:    cb\r\n==1716614==ABORTING\r\n\r\nProcess finished with exit code 1\r\n```\r\n\r\nand with `pymalloc` I got a different trace\r\n\r\n```\r\n=================================================================\r\n==1717283==ERROR: AddressSanitizer: attempting free on address which was not malloc()-ed: 0x7f483bee2310 in thread T4\r\n    #0 0x7f48420d7fb8 in __interceptor_free.part.0 (/lib64/libasan.so.8+0xd7fb8) (BuildId: 7fcb7759bc17ef47f9682414b6d99732d6a6ab0c)\r\n    #1 0x7f4841877b26 in _PyMem_RawFree (/lib64/libpython3.12d.so.1.0+0x277b26) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #2 0x7f4841878e51 in PyMem_RawFree (/lib64/libpython3.12d.so.1.0+0x278e51) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #3 0x7f484187b787 in _PyObject_Free (/lib64/libpython3.12d.so.1.0+0x27b787) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #4 0x7f48418792a2 in PyObject_Free (/lib64/libpython3.12d.so.1.0+0x2792a2) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #5 0x7f4841855e50 in dictresize (/lib64/libpython3.12d.so.1.0+0x255e50) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #6 0x7f4841854949 in insertion_resize (/lib64/libpython3.12d.so.1.0+0x254949) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #7 0x7f4841854ce6 in insertdict (/lib64/libpython3.12d.so.1.0+0x254ce6) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #8 0x7f48418569c4 in _PyDict_SetItem_Take2 (/lib64/libpython3.12d.so.1.0+0x2569c4) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #9 0x7f4841856aa8 in PyDict_SetItem (/lib64/libpython3.12d.so.1.0+0x256aa8) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #10 0x7f48418a4bf3 in add_subclass (/lib64/libpython3.12d.so.1.0+0x2a4bf3) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #11 0x7f48418a41a4 in type_ready_add_subclasses (/lib64/libpython3.12d.so.1.0+0x2a41a4) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #12 0x7f48418a45f4 in type_ready (/lib64/libpython3.12d.so.1.0+0x2a45f4) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #13 0x7f48418a47ad in PyType_Ready (/lib64/libpython3.12d.so.1.0+0x2a47ad) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #14 0x7f484189a983 in type_new_impl (/lib64/libpython3.12d.so.1.0+0x29a983) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #15 0x7f484189af7b in type_new (/lib64/libpython3.12d.so.1.0+0x29af7b) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #16 0x7f483cbe0f52 in PyCFuncPtrType_new (/usr/lib64/python3.12/lib-dynload/_ctypes.cpython-312d-x86_64-linux-gnu.so+0xdf52) (BuildId: cdb5a61ddd026358017a72a3d3405dd431e31b72)\r\n    #17 0x7f48418958c3 in type_call (/lib64/libpython3.12d.so.1.0+0x2958c3) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #18 0x7f48417f8792 in _PyObject_MakeTpCall (/lib64/libpython3.12d.so.1.0+0x1f8792) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #19 0x7f48417f825c in _PyObject_FastCallDictTstate (/lib64/libpython3.12d.so.1.0+0x1f825c) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #20 0x7f48417f8389 in PyObject_VectorcallDict (/lib64/libpython3.12d.so.1.0+0x1f8389) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #21 0x7f484195afd1 in builtin___build_class__ (/lib64/libpython3.12d.so.1.0+0x35afd1) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #22 0x7f484197e62b in _PyEval_EvalFrameDefault (/lib64/libpython3.12d.so.1.0+0x37e62b) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #23 0x7f4841961f81 in _PyEval_EvalFrame.lto_priv.1 (/lib64/libpython3.12d.so.1.0+0x361f81) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #24 0x7f4841986a6c in _PyEval_Vector (/lib64/libpython3.12d.so.1.0+0x386a6c) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #25 0x7f4841963933 in PyEval_EvalCode (/lib64/libpython3.12d.so.1.0+0x363933) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #26 0x7f484195c678 in builtin_exec_impl (/lib64/libpython3.12d.so.1.0+0x35c678) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #27 0x7f4841959a3a in builtin_exec (/lib64/libpython3.12d.so.1.0+0x359a3a) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #28 0x7f484186df9a in cfunction_vectorcall_FASTCALL_KEYWORDS (/lib64/libpython3.12d.so.1.0+0x26df9a) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #29 0x7f48417f8909 in _PyVectorcall_Call (/lib64/libpython3.12d.so.1.0+0x1f8909) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #30 0x7f48417f8cf1 in _PyObject_Call (/lib64/libpython3.12d.so.1.0+0x1f8cf1) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #31 0x7f48417f8dcc in PyObject_Call (/lib64/libpython3.12d.so.1.0+0x1f8dcc) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #32 0x7f48419814dc in _PyEval_EvalFrameDefault (/lib64/libpython3.12d.so.1.0+0x3814dc) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #33 0x7f4841961f81 in _PyEval_EvalFrame.lto_priv.1 (/lib64/libpython3.12d.so.1.0+0x361f81) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #34 0x7f4841986a6c in _PyEval_Vector (/lib64/libpython3.12d.so.1.0+0x386a6c) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #35 0x7f48417f8fdd in _PyFunction_Vectorcall (/lib64/libpython3.12d.so.1.0+0x1f8fdd) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #36 0x7f48417f7c81 in _PyObject_VectorcallTstate.lto_priv.3 (/lib64/libpython3.12d.so.1.0+0x1f7c81) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #37 0x7f48417fa545 in object_vacall (/lib64/libpython3.12d.so.1.0+0x1fa545) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #38 0x7f48417fa84a in PyObject_CallMethodObjArgs (/lib64/libpython3.12d.so.1.0+0x1fa84a) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #39 0x7f48419dba6b in import_find_and_load (/lib64/libpython3.12d.so.1.0+0x3dba6b) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #40 0x7f48419dbdb8 in PyImport_ImportModuleLevelObject (/lib64/libpython3.12d.so.1.0+0x3dbdb8) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #41 0x7f4841988907 in import_name (/lib64/libpython3.12d.so.1.0+0x388907) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #42 0x7f4841976e96 in _PyEval_EvalFrameDefault (/lib64/libpython3.12d.so.1.0+0x376e96) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #43 0x7f4841961f81 in _PyEval_EvalFrame.lto_priv.1 (/lib64/libpython3.12d.so.1.0+0x361f81) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #44 0x7f4841986a6c in _PyEval_Vector (/lib64/libpython3.12d.so.1.0+0x386a6c) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #45 0x7f4841963933 in PyEval_EvalCode (/lib64/libpython3.12d.so.1.0+0x363933) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #46 0x7f484195c678 in builtin_exec_impl (/lib64/libpython3.12d.so.1.0+0x35c678) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #47 0x7f4841959a3a in builtin_exec (/lib64/libpython3.12d.so.1.0+0x359a3a) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #48 0x7f484186df9a in cfunction_vectorcall_FASTCALL_KEYWORDS (/lib64/libpython3.12d.so.1.0+0x26df9a) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #49 0x7f48417f8909 in _PyVectorcall_Call (/lib64/libpython3.12d.so.1.0+0x1f8909) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #50 0x7f48417f8cf1 in _PyObject_Call (/lib64/libpython3.12d.so.1.0+0x1f8cf1) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #51 0x7f48417f8dcc in PyObject_Call (/lib64/libpython3.12d.so.1.0+0x1f8dcc) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #52 0x7f48419814dc in _PyEval_EvalFrameDefault (/lib64/libpython3.12d.so.1.0+0x3814dc) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #53 0x7f4841961f81 in _PyEval_EvalFrame.lto_priv.1 (/lib64/libpython3.12d.so.1.0+0x361f81) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #54 0x7f4841986a6c in _PyEval_Vector (/lib64/libpython3.12d.so.1.0+0x386a6c) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #55 0x7f48417f8fdd in _PyFunction_Vectorcall (/lib64/libpython3.12d.so.1.0+0x1f8fdd) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #56 0x7f48417f7c81 in _PyObject_VectorcallTstate.lto_priv.3 (/lib64/libpython3.12d.so.1.0+0x1f7c81) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #57 0x7f48417fa545 in object_vacall (/lib64/libpython3.12d.so.1.0+0x1fa545) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #58 0x7f48417fa84a in PyObject_CallMethodObjArgs (/lib64/libpython3.12d.so.1.0+0x1fa84a) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #59 0x7f48419dba6b in import_find_and_load (/lib64/libpython3.12d.so.1.0+0x3dba6b) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #60 0x7f48419dbdb8 in PyImport_ImportModuleLevelObject (/lib64/libpython3.12d.so.1.0+0x3dbdb8) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #61 0x7f484195b1ee in builtin___import___impl (/lib64/libpython3.12d.so.1.0+0x35b1ee) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #62 0x7f48419591d8 in builtin___import__ (/lib64/libpython3.12d.so.1.0+0x3591d8) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #63 0x7f484186df9a in cfunction_vectorcall_FASTCALL_KEYWORDS (/lib64/libpython3.12d.so.1.0+0x26df9a) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #64 0x7f48417f7c81 in _PyObject_VectorcallTstate.lto_priv.3 (/lib64/libpython3.12d.so.1.0+0x1f7c81) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #65 0x7f48417f9595 in _PyObject_CallFunctionVa (/lib64/libpython3.12d.so.1.0+0x1f9595) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #66 0x7f48417f96e5 in PyObject_CallFunction (/lib64/libpython3.12d.so.1.0+0x1f96e5) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #67 0x7f48419dc3f5 in PyImport_Import (/lib64/libpython3.12d.so.1.0+0x3dc3f5) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #68 0x7f48419dae85 in PyImport_ImportModule (/lib64/libpython3.12d.so.1.0+0x3dae85) (BuildId: 3c61128b1fd63fa1904863ae8c5c9718b1cd55c4)\r\n    #69 0x5e5700 in qd_python_setup /home/jdanek/repos/skupper-router/src/python_embedded.c:841\r\n    #70 0x57b5a0 in qd_python_initialize /home/jdanek/repos/skupper-router/src/python_embedded.c:58\r\n    #71 0x57b5a0 in qd_dispatch /home/jdanek/repos/skupper-router/src/dispatch.c:137\r\n    #72 0x7b19ef in QDR::initialize(std::__cxx11::basic_string\u003cchar, std::char_traits\u003cchar\u003e, std::allocator\u003cchar\u003e \u003e const\u0026) /home/jdanek/repos/skupper-router/tests/c_unittests/helpers.hpp:206\r\n    #73 0x8974bc in operator() /home/jdanek/repos/skupper-router/tests/c_unittests/test_http_listener_connector.cpp:67\r\n    #74 0x7f4840ae31e2 in execute_native_thread_routine (/lib64/libstdc++.so.6+0xe31e2) (BuildId: 43b5fe9c4fe0185772be4b57539be137c14a5c05)\r\n    #75 0x7f48408ac896 in start_thread (/lib64/libc.so.6+0x8e896) (BuildId: 788cdd41a15985bf8e0a48d213a46e07d58822df)\r\n    #76 0x7f48409336fb in clone3 (/lib64/libc.so.6+0x1156fb) (BuildId: 788cdd41a15985bf8e0a48d213a46e07d58822df)\r\n\r\nAddress 0x7f483bee2310 is a wild pointer inside of access range of size 0x000000000001.\r\nSUMMARY: AddressSanitizer: bad-free (/lib64/libasan.so.8+0xd7fb8) (BuildId: 7fcb7759bc17ef47f9682414b6d99732d6a6ab0c) in __interceptor_free.part.0\r\nThread T4 created by T0 here:\r\n    #0 0x7f4842048956 in pthread_create (/lib64/libasan.so.8+0x48956) (BuildId: 7fcb7759bc17ef47f9682414b6d99732d6a6ab0c)\r\n    #1 0x7f4840ae32b8 in std::thread::_M_start_thread(std::unique_ptr\u003cstd::thread::_State, std::default_delete\u003cstd::thread::_State\u003e \u003e, void (*)()) (/lib64/libstdc++.so.6+0xe32b8) (BuildId: 43b5fe9c4fe0185772be4b57539be137c14a5c05)\r\n    #2 0x7ca08e in DOCTEST_ANON_FUNC_29 /home/jdanek/repos/skupper-router/tests/c_unittests/test_http_listener_connector.cpp:65\r\n    #3 0x78a350 in doctest::Context::run() /home/jdanek/repos/skupper-router/tests/c_unittests/doctest.h:7007\r\n    #4 0x456aad in main /home/jdanek/repos/skupper-router/tests/c_unittests/c_unittests_main.cpp:76\r\n    #5 0x7f4840846149 in __libc_start_call_main (/lib64/libc.so.6+0x28149) (BuildId: 788cdd41a15985bf8e0a48d213a46e07d58822df)\r\n    #6 0x7f484084620a in __libc_start_main_impl (/lib64/libc.so.6+0x2820a) (BuildId: 788cdd41a15985bf8e0a48d213a46e07d58822df)\r\n    #7 0x45c874 in _start (/home/jdanek/repos/skupper-router/cmake-build-relwithdebinfo-asan/tests/c_unittests/c_unittests+0x45c874) (BuildId: 7638f1da81a091da1a78ee3ba7675e8ad027ba1d)\r\n\r\n==1717283==ABORTING\r\n\r\nProcess finished with exit code 1\r\n```\r\n\r\nDoes this look like a Python bug? I'd be happy to attempt a reproducer if the backtraces are deemed sufficiently interesting and worth investigating.\r\n\r\n### CPython versions tested on:\r\n\r\n3.12\r\n\r\n### Operating systems tested on:\r\n\r\nLinux\r\n\r\n### Output from running 'python -VV' on the command line:\r\n\r\n```\r\n$ python3-debug -VV\r\nPython 3.12.0 (main, Oct  2 2023, 00:00:00) [GCC 13.2.1 20230918 (Red Hat 13.2.1-3)]\r\n```\n```[tasklist]\n### Tasks\n```\n","author":{"url":"https://github.com/jiridanek","@type":"Person","name":"jiridanek"},"datePublished":"2023-12-29T22:41:12.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":7},"url":"https://github.com/113576/cpython/issues/113576"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:4d9b5c47-e5bb-8816-7e07-0138d052e2e8
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id8E72:9F506:11384D2:16FD328:6969A9B4
html-safe-nonce44a3dcf32c066105b4b26a4d8651add4f8be00f0f50bc29f89d8f2c6c1148377
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RTcyOjlGNTA2OjExMzg0RDI6MTZGRDMyODo2OTY5QTlCNCIsInZpc2l0b3JfaWQiOiI2MTc0NTA1Mjg3ODM4OTY4MjQ0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac2242452afc7506f5822796521c923b5977ff51b3f90a9b3abd0b5beaf4cbeaf1
hovercard-subject-tagissue:2060444520
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/113576/issue_layout
twitter:imagehttps://opengraph.githubassets.com/2e02c746fc67a3491f3affdb22319e1f68400354e87a249bf086e242f08a0746/python/cpython/issues/113576
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/2e02c746fc67a3491f3affdb22319e1f68400354e87a249bf086e242f08a0746/python/cpython/issues/113576
og:image:altCrash report What happened? I have a binary which is embedding python. I want to test this binary with address sanitizer, and leak sanitizer. Regular python3.12 build contained in Fedora 39 causes ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamejiridanek
hostnamegithub.com
expected-hostnamegithub.com
None24c4c97a2d520cb286b35e1a4c22d7a4df3c26a2fa28dd7cdf0e65db327b4de7
turbo-cache-controlno-preview
go-importgithub.com/python/cpython git https://github.com/python/cpython.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id81598961
octolytics-dimension-repository_nwopython/cpython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id81598961
octolytics-dimension-repository_network_root_nwopython/cpython
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release124667f43168afb6c9c03b7c02eb5b1d2e1be3d9
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/issues/113576#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F113576
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F113576
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/issues/113576
Reloadhttps://github.com/python/cpython/issues/113576
Reloadhttps://github.com/python/cpython/issues/113576
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/issues/113576
Notifications https://github.com/login?return_to=%2Fpython%2Fcpython
Fork 33.9k https://github.com/login?return_to=%2Fpython%2Fcpython
Star 71.1k https://github.com/login?return_to=%2Fpython%2Fcpython
Code https://github.com/python/cpython
Issues 5k+ https://github.com/python/cpython/issues
Pull requests 2.1k https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects 31 https://github.com/python/cpython/projects
Security Uh oh! There was an error while loading. Please reload this page. https://github.com/python/cpython/security
Please reload this pagehttps://github.com/python/cpython/issues/113576
Insights https://github.com/python/cpython/pulse
Code https://github.com/python/cpython
Issues https://github.com/python/cpython/issues
Pull requests https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects https://github.com/python/cpython/projects
Security https://github.com/python/cpython/security
Insights https://github.com/python/cpython/pulse
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/113576
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/113576
Possible heap-use-after-free in ctypes in Python 3.12https://github.com/python/cpython/issues/113576#top
3.12only security fixeshttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%223.12%22
topic-ctypeshttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22topic-ctypes%22
topic-subinterpretershttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22topic-subinterpreters%22
type-crashA hard crash of the interpreter, possibly with a core dumphttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-crash%22
https://github.com/jiridanek
https://github.com/jiridanek
jiridanekhttps://github.com/jiridanek
on Dec 29, 2023https://github.com/python/cpython/issues/113576#issue-2060444520
Crashes and errors in test_embed with PYTHONUOPS=1 #111339https://github.com/python/cpython/issues/111339
3.12only security fixeshttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%223.12%22
topic-ctypeshttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22topic-ctypes%22
topic-subinterpretershttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22topic-subinterpreters%22
type-crashA hard crash of the interpreter, possibly with a core dumphttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-crash%22
Subinterpretershttps://github.com/orgs/python/projects/3
Ctypes issueshttps://github.com/orgs/python/projects/42
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.