René's URL Explorer Experiment


Title: Crash (Sigsev) in JIT optimizer `_GUARD_LOAD_SUPER_ATTR_METHOD` · Issue #148618 · python/cpython · GitHub

Open Graph Title: Crash (Sigsev) in JIT optimizer `_GUARD_LOAD_SUPER_ATTR_METHOD` · Issue #148618 · python/cpython

X Title: Crash (Sigsev) in JIT optimizer `_GUARD_LOAD_SUPER_ATTR_METHOD` · Issue #148618 · python/cpython

Description: Bug report Bug description: The JIT optimizer crashes with a NULL pointer dereference (SIGSEGV at address 0x8) when tracing a polymorphic super().method() call site that has been observed with multiple different class types. How to repro...

Open Graph Description: Bug report Bug description: The JIT optimizer crashes with a NULL pointer dereference (SIGSEGV at address 0x8) when tracing a polymorphic super().method() call site that has been observed with mult...

X Description: Bug report Bug description: The JIT optimizer crashes with a NULL pointer dereference (SIGSEGV at address 0x8) when tracing a polymorphic super().method() call site that has been observed with mult...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Crash (Sigsev) in JIT optimizer `_GUARD_LOAD_SUPER_ATTR_METHOD`","articleBody":"# Bug report\n\n### Bug description:\n\nThe JIT optimizer crashes with a NULL pointer dereference (SIGSEGV at address `0x8`) when tracing a polymorphic `super().method()` call site that has been observed with multiple different class types.\n\n## How to reproduce\n\nSave the following as `poc_stale_super_ptr.py` and run with JIT stress mode:\n\n```bash\n./python.exe --version\nPython 3.15.0a8+\n\nPYTHON_JIT=0 ./python.exe poc_stale_super_ptr.py\n# -> exit 0, no crash\n\nPYTHON_JIT_STRESS=1 ./python.exe poc_stale_super_ptr.py\nzsh: segmentation fault  PYTHON_JIT_STRESS=1 ./python.exe poc_stale_super_ptr.py\n```\n\n\u003cdetails>\n\u003csummary>poc_stale_super_ptr.py\u003c/summary>\n\n_Disclaimer: The PoC has been generated by an AI assistant, and I verified it worked on both my computer and a remote VM_\n\n```python\nclass Base:\n    def method(self):\n        return 1\n\n# 30 sibling classes each overriding method() with super().method()\nclass C0(Base):\n    def method(self): return super().method() + 1\nclass C1(Base):\n    def method(self): return super().method() + 1\nclass C2(Base):\n    def method(self): return super().method() + 1\nclass C3(Base):\n    def method(self): return super().method() + 1\nclass C4(Base):\n    def method(self): return super().method() + 1\nclass C5(Base):\n    def method(self): return super().method() + 1\nclass C6(Base):\n    def method(self): return super().method() + 1\nclass C7(Base):\n    def method(self): return super().method() + 1\nclass C8(Base):\n    def method(self): return super().method() + 1\nclass C9(Base):\n    def method(self): return super().method() + 1\nclass C10(Base):\n    def method(self): return super().method() + 1\nclass C11(Base):\n    def method(self): return super().method() + 1\nclass C12(Base):\n    def method(self): return super().method() + 1\nclass C13(Base):\n    def method(self): return super().method() + 1\nclass C14(Base):\n    def method(self): return super().method() + 1\nclass C15(Base):\n    def method(self): return super().method() + 1\nclass C16(Base):\n    def method(self): return super().method() + 1\nclass C17(Base):\n    def method(self): return super().method() + 1\nclass C18(Base):\n    def method(self): return super().method() + 1\nclass C19(Base):\n    def method(self): return super().method() + 1\nclass C20(Base):\n    def method(self): return super().method() + 1\nclass C21(Base):\n    def method(self): return super().method() + 1\nclass C22(Base):\n    def method(self): return super().method() + 1\nclass C23(Base):\n    def method(self): return super().method() + 1\nclass C24(Base):\n    def method(self): return super().method() + 1\nclass C25(Base):\n    def method(self): return super().method() + 1\nclass C26(Base):\n    def method(self): return super().method() + 1\nclass C27(Base):\n    def method(self): return super().method() + 1\nclass C28(Base):\n    def method(self): return super().method() + 1\nclass C29(Base):\n    def method(self): return super().method() + 1\n\n# 5-deep inheritance chain\nclass D0(Base):\n    def method(self): return super().method() + 1\nclass D1(D0):\n    def method(self): return super().method() + 1\nclass D2(D1):\n    def method(self): return super().method() + 1\nclass D3(D2):\n    def method(self): return super().method() + 1\nclass D4(D3):\n    def method(self): return super().method() + 1\n\nALL = [\n    C0, C1, C2, C3, C4, C5, C6, C7, C8, C9,\n    C10, C11, C12, C13, C14, C15, C16, C17, C18, C19,\n    C20, C21, C22, C23, C24, C25, C26, C27, C28, C29,\n    D0, D1, D2, D3, D4,\n]\n\n# Pass 1 warms specialization; pass 2 triggers JIT tracing.\nfor _ in range(2):\n    for cls in ALL:\n        cls().method()\n```\n\n\u003c/details>\n\n## Root cause\n\nCommit [`458aca9237`](https://github.com/python/cpython/commit/458aca92370d4b221f0e357f3104ed3c465756d6) added a `_GUARD_LOAD_SUPER_ATTR_METHOD` optimizer case in `Python/optimizer_bytecodes`.\n\nhttps://github.com/python/cpython/blob/70eb56be427aac3fc45342024dbcfef632accc3a/Python/optimizer_bytecodes.c#L1018-L1033\n\nWhen `known == NULL` but there are no `probable`, then `sym_set_const` is called with `(class_st, NULL)`.\n\n[sym_set_const](https://github.com/python/cpython/blob/70eb56be427aac3fc45342024dbcfef632accc3a/Python/optimizer_symbols.c#L476) calls [`make_const`](https://github.com/python/cpython/blob/70eb56be427aac3fc45342024dbcfef632accc3a/Python/optimizer_symbols.c#L181-L185), which then calls Py_NewRef(NULL) and finally will at some point try to increase the ref count:\n\nhttps://github.com/python/cpython/blob/70eb56be427aac3fc45342024dbcfef632accc3a/Include/refcount.h#L298\n \n## Fix\n\nI think that's enough to do the following check:\n\n```c\n// Python/optimizer_bytecodes.c, line ~955\nif (known != NULL) {\n    sym_set_const(class_st, (PyObject *)known);\n}\n```\n\n_Found by compiling the stencils with ASAN_\n\n\u003cdetails>\n\u003csummary>Stack crash\u003c/summary>\n\n```bash\nAddressSanitizer:DEADLYSIGNAL\n=================================================================\n==418369==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x56043dbaecb7 bp 0x7fffe30dca20 sp 0x7fffe30dca20 T0)\n==418369==The signal is caused by a READ memory access.\n==418369==Hint: address points to the zero page.\n    #0 0x56043dbaecb7 in Py_INCREF Include/refcount.h:286\n    #1 0x56043dbaed00 in _Py_NewRef Include/refcount.h:536\n    #2 0x56043dbaed00 in make_const Python/optimizer_symbols.c:187\n    #3 0x56043dbb23b7 in _Py_uop_sym_set_const Python/optimizer_symbols.c:632\n    #4 0x56043dba448f in optimize_uops Python/optimizer_cases.c.h:2371\n    #5 0x56043dbaebd4 in _Py_uop_analyze_and_optimize Python/optimizer_analysis.c:792\n    #6 0x56043db958e5 in uop_optimize Python/optimizer.c:1543\n    #7 0x56043db96e45 in _PyOptimizer_Optimize Python/optimizer.c:166\n    #8 0x56043d95308f in stop_tracing_and_jit Python/ceval.c:1138\n    #9 0x56043d99c583 in _PyEval_EvalFrameDefault Python/generated_cases.c.h:12213\n    #10 0x56043d9a03a2 in _PyEval_EvalFrame Include/internal/pycore_ceval.h:118\n    #11 0x56043d9a06ed in _PyEval_Vector Python/ceval.c:2174\n    #12 0x56043d9a097c in PyEval_EvalCode Python/ceval.c:686\n    #13 0x56043dbde6de in run_eval_code_obj Python/pythonrun.c:1369\n    #14 0x56043dbde9e7 in run_mod Python/pythonrun.c:1472\n    #15 0x56043dbdf841 in pyrun_file Python/pythonrun.c:1296\n    #16 0x56043dbe2424 in _PyRun_SimpleFileObject Python/pythonrun.c:518\n    #17 0x56043dbe26ad in _PyRun_AnyFileObject Python/pythonrun.c:81\n    #18 0x56043dc3582e in pymain_run_file_obj Modules/main.c:411\n    #19 0x56043dc35a83 in pymain_run_file Modules/main.c:430\n    #20 0x56043dc3730a in pymain_run_python Modules/main.c:715\n    #21 0x56043dc3794c in Py_RunMain Modules/main.c:796\n    #22 0x56043dc37b0b in pymain_main Modules/main.c:826\n    #23 0x56043dc37e1c in Py_BytesMain Modules/main.c:850\n    #24 0x56043d56eb71 in main Programs/python.c:15\n    #25 0x7f159c345ca7  (/lib/x86_64-linux-gnu/libc.so.6+0x29ca7) (BuildId: 58749c528985eab03e6700ebc1469fa50aa41219)\n    #26 0x7f159c345d64 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29d64) (BuildId: 58749c528985eab03e6700ebc1469fa50aa41219)\n    #27 0x56043d56eaa0 in _start (/home/.../python+0x326aa0) (BuildId: 0751f7a328fd60f87db90ff375974647e5b13d3a)\n\nAddressSanitizer can not provide additional info.\nSUMMARY: AddressSanitizer: SEGV Include/refcount.h:286 in Py_INCREF\n==418369==ABORTING\n```\n\n\u003c/summary>\n\n### CPython versions tested on:\n\nCPython main branch\n\n### Operating systems tested on:\n\nmacOS","author":{"url":"https://github.com/DarkaMaul","@type":"Person","name":"DarkaMaul"},"datePublished":"2026-04-15T14:50:44Z","url":"https://github.com/python/cpython/issues/148618"}

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:fc69b6bc-c194-3469-f4c7-91ae33175961
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idDCB0:EA09B:36C4C01:4896275:6B02078B
html-safe-noncea97b92e6020ee593f319545c488c65f34cd7a3b51d44357b9846f97fcdf7ad6a
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQ0IwOkVBMDlCOjM2QzRDMDE6NDg5NjI3NTo2QjAyMDc4QiIsInZpc2l0b3JfaWQiOiI1NDIzNDY1NjM0MDgyMTk1MzM5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac14c53fab229b9eccdee5997643ab2b1bd728772010a51366ec75bb72737df090
hovercard-subject-tagissue:4269754011
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/148618/issue_layout
twitter:imagehttps://opengraph.githubassets.com/19a4cdf1020c83e7fd246949a0b69efba55f86da99bc706dad283b536a4fceca/python/cpython/issues/148618
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/19a4cdf1020c83e7fd246949a0b69efba55f86da99bc706dad283b536a4fceca/python/cpython/issues/148618
og:image:altBug report Bug description: The JIT optimizer crashes with a NULL pointer dereference (SIGSEGV at address 0x8) when tracing a polymorphic super().method() call site that has been observed with mult...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameDarkaMaul
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/148618#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F148618
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%2F148618
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/148618
Reloadhttps://github.com/python/cpython/issues/148618
Reloadhttps://github.com/python/cpython/issues/148618
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/148618
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/148618
Crash (Sigsev) in JIT optimizer _GUARD_LOAD_SUPER_ATTR_METHODhttps://github.com/python/cpython/issues/148618#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-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/DarkaMaul
DarkaMaulhttps://github.com/DarkaMaul
on Apr 15, 2026https://github.com/python/cpython/issues/148618#issue-4269754011
458aca9237https://github.com/python/cpython/commit/458aca92370d4b221f0e357f3104ed3c465756d6
cpython/Python/optimizer_bytecodes.chttps://github.com/python/cpython/blob/70eb56be427aac3fc45342024dbcfef632accc3a/Python/optimizer_bytecodes.c#L1018-L1033
70eb56bhttps://github.com/python/cpython/commit/70eb56be427aac3fc45342024dbcfef632accc3a
sym_set_consthttps://github.com/python/cpython/blob/70eb56be427aac3fc45342024dbcfef632accc3a/Python/optimizer_symbols.c#L476
make_consthttps://github.com/python/cpython/blob/70eb56be427aac3fc45342024dbcfef632accc3a/Python/optimizer_symbols.c#L181-L185
cpython/Include/refcount.hhttps://github.com/python/cpython/blob/70eb56be427aac3fc45342024dbcfef632accc3a/Include/refcount.h#L298
70eb56bhttps://github.com/python/cpython/commit/70eb56be427aac3fc45342024dbcfef632accc3a
DarkaMaulhttps://github.com/DarkaMaul
type-bugAn unexpected behavior, bug, or errorhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-bug%22
on Apr 15, 2026https://github.com/python/cpython/issues/148618#event-24533240266
StanFromIrelandhttps://github.com/StanFromIreland
interpreter-core(Objects, Python, Grammar, and Parser dirs)https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22interpreter-core%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
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
on Apr 15, 2026https://github.com/python/cpython/issues/148618#event-24534504079
https://github.com/cocolato
cocolatohttps://github.com/cocolato
on Apr 15, 2026https://github.com/python/cpython/issues/148618#issuecomment-4253955504
https://github.com/cocolato
cocolatohttps://github.com/cocolato
on Apr 15, 2026https://github.com/python/cpython/issues/148618#issuecomment-4254207926
https://github.com/NekoAsakura
NekoAsakurahttps://github.com/NekoAsakura
on Apr 15, 2026https://github.com/python/cpython/issues/148618#issuecomment-4256286255
JIT: _Py_uop_sym_set_recorded_type may receive a non-type at trace optimization time. #148439https://github.com/python/cpython/issues/148439
cpython/Python/optimizer_symbols.chttps://github.com/python/cpython/blob/54607eec34b42d377a12fe16697e61a1663a1f42/Python/optimizer_symbols.c#L1139-L1145
54607eehttps://github.com/python/cpython/commit/54607eec34b42d377a12fe16697e61a1663a1f42
https://github.com/cocolato
cocolatohttps://github.com/cocolato
on Apr 16, 2026https://github.com/python/cpython/issues/148618#issuecomment-4257110104
https://github.com/cocolato
cocolatohttps://github.com/cocolato
on Apr 16, 2026https://github.com/python/cpython/issues/148618#issuecomment-4257149345
@Fidget-Spinnerhttps://github.com/Fidget-Spinner
#148571 (comment)https://github.com/python/cpython/issues/148571#issuecomment-4249817023
https://github.com/NekoAsakura
NekoAsakurahttps://github.com/NekoAsakura
on Apr 16, 2026https://github.com/python/cpython/issues/148618#issuecomment-4257195162
#148571https://github.com/python/cpython/issues/148571
cocolatohttps://github.com/cocolato
completedhttps://github.com/python/cpython/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Apr 28, 2026https://github.com/python/cpython/issues/148618#event-24949879687
Sign up for freehttps://github.com/signup?return_to=https://github.com/python/cpython/issues/148618
Sign in to commenthttps://github.com/login?return_to=https://github.com/python/cpython/issues/148618
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-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
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.