Title: ASan memory leak in test_gc with --enable-experimental-jit (allocate_executor) · Issue #142476 · python/cpython · GitHub
Open Graph Title: ASan memory leak in test_gc with --enable-experimental-jit (allocate_executor) · Issue #142476 · python/cpython
X Title: ASan memory leak in test_gc with --enable-experimental-jit (allocate_executor) · Issue #142476 · python/cpython
Description: Bug report Bug description: I encountered a memory leak detection by AddressSanitizer when running test_gc with the experimental JIT enabled. Build reproduction CC=clang-21 CXX=clang++-21 ./configure --with-pydebug --with-address-sanitiz...
Open Graph Description: Bug report Bug description: I encountered a memory leak detection by AddressSanitizer when running test_gc with the experimental JIT enabled. Build reproduction CC=clang-21 CXX=clang++-21 ./configu...
X Description: Bug report Bug description: I encountered a memory leak detection by AddressSanitizer when running test_gc with the experimental JIT enabled. Build reproduction CC=clang-21 CXX=clang++-21 ./configu...
Opengraph URL: https://github.com/python/cpython/issues/142476
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"ASan memory leak in test_gc with --enable-experimental-jit (allocate_executor)","articleBody":"# Bug report\n\n### Bug description:\n\nI encountered a memory leak detection by AddressSanitizer when running `test_gc` with the experimental JIT enabled.\n\n### Build reproduction\n\n```bash\nCC=clang-21 CXX=clang++-21 ./configure --with-pydebug --with-address-sanitizer --enable-experimental-jit=yes && make -j\n```\n\n### Test execution\n\n```bash\n./python -X dev -m test test_gc -j8 -uall\n```\n\n### Output\n\n```text\nUsing random seed: 3252749262\n0:00:00 load avg: 27.26 Run 1 test in parallel using 1 worker process\n0:00:07 load avg: 23.30 [1/1/1] test_gc failed (1 failure)\ntest test_gc failed -- Traceback (most recent call last):\n File \"/home/shamil/oss/cpython/main/Lib/test/test_gc.py\", line 1242, in test_incremental_gc_handles_fast_cycle_creation\n run_test_script(script)\n ~~~~~~~~~~~~~~~^^^^^^^^\n File \"/home/shamil/oss/cpython/main/Lib/test/support/script_helper.py\", line 324, in run_test_script\n assert_python_ok(\"-u\", script, \"-v\")\n ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^\n File \"/home/shamil/oss/cpython/main/Lib/test/support/script_helper.py\", line 182, in assert_python_ok\n return _assert_python(True, *args, **env_vars)\n File \"/home/shamil/oss/cpython/main/Lib/test/support/script_helper.py\", line 167, in _assert_python\n res.fail(cmd_line)\n ~~~~~~~~^^^^^^^^^^\n File \"/home/shamil/oss/cpython/main/Lib/test/support/script_helper.py\", line 80, in fail\n raise AssertionError(f\"Process return code is {exitcode}\\n\"\n ...\u003c10 lines>...\n f\"---\")\nAssertionError: Process return code is 1\ncommand line: ['/home/shamil/oss/cpython/main/python', '-X', 'faulthandler', '-I', '-u', '/home/shamil/oss/cpython/main/Lib/test/_test_gc_fast_cycles.py', '-v']\n\nstdout:\n---\n\n---\n\nstderr:\n---\ntest_incremental_gc_handles_fast_cycle_creation (__main__.IncrementalGCTests.test_incremental_gc_handles_fast_cycle_creation) ... ok\n\n----------------------------------------------------------------------\nRan 1 test in 0.412s\n\nOK\n\n=================================================================\n==16076==ERROR: LeakSanitizer: detected memory leaks\n\nDirect leak of 2280 byte(s) in 1 object(s) allocated from:\n #0 0x60e720cbba98 in malloc (/home/shamil/oss/cpython/main/python+0x360a98) (BuildId: 36b2d572cb504336bfe93807eea32cad15efa807)\n #1 0x60e72102e761 in _PyMem_DebugRawAlloc /home/shamil/oss/cpython/main/Objects/obmalloc.c:2889:24\n #2 0x60e72102e761 in _PyMem_DebugRawMalloc /home/shamil/oss/cpython/main/Objects/obmalloc.c:2922:12\n #3 0x60e72102e761 in _PyMem_DebugMalloc /home/shamil/oss/cpython/main/Objects/obmalloc.c:3087:12\n #4 0x60e7213573b0 in _PyObject_MallocWithType /home/shamil/oss/cpython/main/./Include/internal/pycore_object_alloc.h:46:17\n #5 0x60e7213573b0 in gc_alloc /home/shamil/oss/cpython/main/Python/gc.c:2352:17\n #6 0x60e7213573b0 in _PyObject_GC_NewVar /home/shamil/oss/cpython/main/Python/gc.c:2394:25\n #7 0x60e7214d102e in allocate_executor /home/shamil/oss/cpython/main/Python/optimizer.c:1176:30\n #8 0x60e7214d102e in make_executor_from_uops /home/shamil/oss/cpython/main/Python/optimizer.c:1260:35\n #9 0x60e7214d102e in uop_optimize /home/shamil/oss/cpython/main/Python/optimizer.c:1397:35\n #10 0x60e7214d102e in _PyOptimizer_Optimize /home/shamil/oss/cpython/main/Python/optimizer.c:164:15\n #11 0x60e7212b79c3 in stop_tracing_and_jit /home/shamil/oss/cpython/main/Python/ceval.c:1392:15\n #12 0x60e721275f41 in _PyEval_EvalFrameDefault /home/shamil/oss/cpython/main/Python/generated_cases.c.h:11383:27\n #13 0x60e7212516a7 in _PyEval_EvalFrame /home/shamil/oss/cpython/main/./Include/internal/pycore_ceval.h:119:16\n #14 0x60e7212516a7 in _PyEval_Vector /home/shamil/oss/cpython/main/Python/ceval.c:2453:12\n #15 0x60e720ece23f in _PyObject_VectorcallTstate /home/shamil/oss/cpython/main/./Include/internal/pycore_call.h:136:11\n #16 0x60e720ecb686 in method_vectorcall /home/shamil/oss/cpython/main/Objects/classobject.c:95:18\n #17 0x60e720ec3ee9 in _PyVectorcall_Call /home/shamil/oss/cpython/main/Objects/call.c:273:16\n #18 0x60e72127c64d in _PyEval_EvalFrameDefault /home/shamil/oss/cpython/main/Python/generated_cases.c.h:2450:32\n #19 0x60e7212516a7 in _PyEval_EvalFrame /home/shamil/oss/cpython/main/./Include/internal/pycore_ceval.h:119:16\n #20 0x60e7212516a7 in _PyEval_Vector /home/shamil/oss/cpython/main/Python/ceval.c:2453:12\n #21 0x60e720ec1c11 in _PyObject_VectorcallDictTstate /home/shamil/oss/cpython/main/Objects/call.c:135:15\n #22 0x60e720ec4ea5 in _PyObject_Call_Prepend /home/shamil/oss/cpython/main/Objects/call.c:504:24\n #23 0x60e7210937a2 in call_method /home/shamil/oss/cpython/main/Objects/typeobject.c:3087:19\n #24 0x60e720ec221a in _PyObject_MakeTpCall /home/shamil/oss/cpython/main/Objects/call.c:242:18\n #25 0x60e721251c10 in _Py_VectorCall_StackRefSteal /home/shamil/oss/cpython/main/Python/ceval.c:1042:11\n #26 0x60e721276ddf in _PyEval_EvalFrameDefault /home/shamil/oss/cpython/main/Python/generated_cases.c.h:3704:35\n #27 0x60e7212516a7 in _PyEval_EvalFrame /home/shamil/oss/cpython/main/./Include/internal/pycore_ceval.h:119:16\n #28 0x60e7212516a7 in _PyEval_Vector /home/shamil/oss/cpython/main/Python/ceval.c:2453:12\n #29 0x60e720ece23f in _PyObject_VectorcallTstate /home/shamil/oss/cpython/main/./Include/internal/pycore_call.h:136:11\n #30 0x60e720ecb686 in method_vectorcall /home/shamil/oss/cpython/main/Objects/classobject.c:95:18\n #31 0x60e720ec3ee9 in _PyVectorcall_Call /home/shamil/oss/cpython/main/Objects/call.c:273:16\n #32 0x60e72127c64d in _PyEval_EvalFrameDefault /home/shamil/oss/cpython/main/Python/generated_cases.c.h:2450:32\n #33 0x60e7212516a7 in _PyEval_EvalFrame /home/shamil/oss/cpython/main/./Include/internal/pycore_ceval.h:119:16\n #34 0x60e7212516a7 in _PyEval_Vector /home/shamil/oss/cpython/main/Python/ceval.c:2453:12\n #35 0x60e720ec1c11 in _PyObject_VectorcallDictTstate /home/shamil/oss/cpython/main/Objects/call.c:135:15\n #36 0x60e720ec4ea5 in _PyObject_Call_Prepend /home/shamil/oss/cpython/main/Objects/call.c:504:24\n #37 0x60e7210937a2 in call_method /home/shamil/oss/cpython/main/Objects/typeobject.c:3087:19\n #38 0x60e720ec221a in _PyObject_MakeTpCall /home/shamil/oss/cpython/main/Objects/call.c:242:18\n #39 0x60e72128d4ff in _PyEval_EvalFrameDefault /home/shamil/oss/cpython/main/Python/generated_cases.c.h:1574:35\n #40 0x60e7212516a7 in _PyEval_EvalFrame /home/shamil/oss/cpython/main/./Include/internal/pycore_ceval.h:119:16\n #41 0x60e7212516a7 in _PyEval_Vector /home/shamil/oss/cpython/main/Python/ceval.c:2453:12\n\nSUMMARY: AddressSanitizer: 2280 byte(s) leaked in 1 allocation(s).\n```\n\n### CPython versions tested on:\n\nCPython main branch\n\n### Operating systems tested on:\n\nLinux\n\n\u003c!-- gh-linked-prs -->\n### Linked PRs\n* gh-142492\n* gh-143021\n\u003c!-- /gh-linked-prs -->\n","author":{"url":"https://github.com/ashm-dev","@type":"Person","name":"ashm-dev"},"datePublished":"2025-12-09T17:12:21Z","url":"https://github.com/python/cpython/issues/142476"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:06a08e45-e854-9057-938a-d94aae0c9e64 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 862A:DB09F:438C10D:5616DAD:6B023EC7 |
| html-safe-nonce | 5671ef9f7ba5df5144751beab9218b8370fa3a50f9a0f31296f23be83085402d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NjJBOkRCMDlGOjQzOEMxMEQ6NTYxNkRBRDo2QjAyM0VDNyIsInZpc2l0b3JfaWQiOiI4NDM0NjA4NjM0ODM4NzkzOTI3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | b467ed1c0f97780f086b11117eee064c96fd8c4843d8882c8720f1c03cb3a455 |
| hovercard-subject-tag | issue:3711872762 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/142476/issue_layout |
| twitter:image | https://opengraph.githubassets.com/16f6151fb6f18a30eaa37bcafbfbedbc5409c692369f433fa0a8064f152c345d/python/cpython/issues/142476 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/16f6151fb6f18a30eaa37bcafbfbedbc5409c692369f433fa0a8064f152c345d/python/cpython/issues/142476 |
| og:image:alt | Bug report Bug description: I encountered a memory leak detection by AddressSanitizer when running test_gc with the experimental JIT enabled. Build reproduction CC=clang-21 CXX=clang++-21 ./configu... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ashm-dev |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width