René's URL Explorer Experiment


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

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@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-profiling0
react-import-mapreact,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-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:06a08e45-e854-9057-938a-d94aae0c9e64
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id862A:DB09F:438C10D:5616DAD:6B023EC7
html-safe-nonce5671ef9f7ba5df5144751beab9218b8370fa3a50f9a0f31296f23be83085402d
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NjJBOkRCMDlGOjQzOEMxMEQ6NTYxNkRBRDo2QjAyM0VDNyIsInZpc2l0b3JfaWQiOiI4NDM0NjA4NjM0ODM4NzkzOTI3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacb467ed1c0f97780f086b11117eee064c96fd8c4843d8882c8720f1c03cb3a455
hovercard-subject-tagissue:3711872762
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/142476/issue_layout
twitter:imagehttps://opengraph.githubassets.com/16f6151fb6f18a30eaa37bcafbfbedbc5409c692369f433fa0a8064f152c345d/python/cpython/issues/142476
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/16f6151fb6f18a30eaa37bcafbfbedbc5409c692369f433fa0a8064f152c345d/python/cpython/issues/142476
og:image:altBug 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:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameashm-dev
hostnamegithub.com
expected-hostnamegithub.com
None87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456
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
release423dbb54c5e7bfecc838eb387c1435eb3d0e760d
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/python/cpython/issues/142476#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F142476
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
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
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://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/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F142476
Sign uphttps://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/142476
Reloadhttps://github.com/python/cpython/issues/142476
Reloadhttps://github.com/python/cpython/issues/142476
pythonhttps://github.com/python
cpythonhttps://github.com/python/cpython
Codehttps://github.com/python/cpython
Issues5k+ (5k+)https://github.com/python/cpython/issues
Pull requests2.4k (2.4k)https://github.com/python/cpython/pulls
Actionshttps://github.com/python/cpython/actions
Projectshttps://github.com/python/cpython/projects
Security and qualityhttps://github.com/python/cpython/security
Insightshttps://github.com/python/cpython/insights
https://github.com/python/cpython
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/142476
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/142476
ASan memory leak in test_gc with --enable-experimental-jit (allocate_executor)https://github.com/python/cpython/issues/142476#top
interpreter-core(Objects, Python, Grammar, and Parser dirs)https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22interpreter-core%22
topic-JIThttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22topic-JIT%22
type-bugAn unexpected behavior, bug, or errorhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-bug%22
https://github.com/ashm-dev
ashm-devhttps://github.com/ashm-dev
on Dec 9, 2025https://github.com/python/cpython/issues/142476#issue-3711872762
gh-142476: fix memory leak when creating JIT executors #142492https://github.com/python/cpython/pull/142492
gh-142476: Fix Windows crashing with JIT #143021https://github.com/python/cpython/pull/143021
ashm-devhttps://github.com/ashm-dev
type-bugAn unexpected behavior, bug, or errorhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-bug%22
on Dec 9, 2025https://github.com/python/cpython/issues/142476#event-21459386608
devdanzinhttps://github.com/devdanzin
interpreter-core(Objects, Python, Grammar, and Parser dirs)https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22interpreter-core%22
on Dec 9, 2025https://github.com/python/cpython/issues/142476#event-21459449919
savannahostrowskihttps://github.com/savannahostrowski
topic-JIThttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22topic-JIT%22
on Dec 9, 2025https://github.com/python/cpython/issues/142476#event-21459783046
Fidget-Spinnerhttps://github.com/Fidget-Spinner
on Dec 19, 2025https://github.com/python/cpython/issues/142476#event-21676658776
gh-142476: fix memory leak when creating JIT executors (GH-142492)https://github.com/python/cpython/commit/e2a7db717507a66b49bb796391530147b3acab93
gh-142476https://github.com/python/cpython/issues/142476
GH-142492https://github.com/python/cpython/pull/142492
e2a7db7https://github.com/python/cpython/commit/e2a7db717507a66b49bb796391530147b3acab93
cocolatohttps://github.com/cocolato
on Dec 22, 2025https://github.com/python/cpython/issues/142476#event-21695284006
pythongh-142476: fix memory leak when creating JIT executors (pythonG…https://github.com/cocolato/cpython/commit/6389e8d1a063403c87041e442434071a2867fd75
pythongh-142476https://github.com/python/cpython/issues/142476
pythonG…https://github.com/python/cpython/pull/142492
6389e8dhttps://github.com/cocolato/cpython/commit/6389e8d1a063403c87041e442434071a2867fd75
Fidget-Spinnerhttps://github.com/Fidget-Spinner
on Dec 22, 2025https://github.com/python/cpython/issues/142476#event-21706482280
gh-142476: Fix Windows crashing with JIT (GH-143021)https://github.com/python/cpython/commit/9ded3dd4e9a46c279f880f5096f83a5ae1971b99
gh-142476https://github.com/python/cpython/issues/142476
GH-143021https://github.com/python/cpython/pull/143021
9ded3ddhttps://github.com/python/cpython/commit/9ded3dd4e9a46c279f880f5096f83a5ae1971b99
https://github.com/cocolato
cocolatohttps://github.com/cocolato
on Feb 12, 2026https://github.com/python/cpython/issues/142476#issuecomment-3890948119
@Fidget-Spinnerhttps://github.com/Fidget-Spinner
Fidget-Spinnerhttps://github.com/Fidget-Spinner
completedhttps://github.com/python/cpython/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Feb 12, 2026https://github.com/python/cpython/issues/142476#event-22738041182
matthiasgoergenshttps://github.com/matthiasgoergens
on Jul 30, 2026https://github.com/python/cpython/issues/142476#event-28722659381
pythongh-148286: Track JIT-allocated memory with Valgrind client requ…https://github.com/matthiasgoergens/cpython/commit/f3dec60a7777cb8089e4bb78c1813cf3dca38dab
pythongh-148286https://github.com/python/cpython/issues/148286
f3dec60https://github.com/matthiasgoergens/cpython/commit/f3dec60a7777cb8089e4bb78c1813cf3dca38dab
Sign up for freehttps://github.com/signup?return_to=https://github.com/python/cpython/issues/142476
Sign in to commenthttps://github.com/login?return_to=https://github.com/python/cpython/issues/142476
interpreter-core(Objects, Python, Grammar, and Parser dirs)https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22interpreter-core%22
topic-JIThttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22topic-JIT%22
type-bugAn unexpected behavior, bug, or errorhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-bug%22
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.