René's URL Explorer Experiment


Title: gh-146442: Fix various bugs in compiler pipeline from bug report by A0su · Pull Request #146443 · python/cpython · GitHub

Open Graph Title: gh-146442: Fix various bugs in compiler pipeline from bug report by A0su · Pull Request #146443 · python/cpython

X Title: gh-146442: Fix various bugs in compiler pipeline from bug report by A0su · Pull Request #146443 · python/cpython

Description: Compiler Pipeline (codegen + compile + symtable + flowgraph + assemble) | 6 FIX codegen.c (6,632 lines) — 4 FIX NULL deref + ref leak in codegen_setup_annotations_scope (line 716-720): PyLong_FromLong result not NULL-checked, passed to ADDOP_LOAD_CONST which dereferences it. Also never DECREF'd even on success. Ref leak of mangled in codegen_nameop (line 3280): RETURN_IF_ERROR(scope) early-returns without DECREF'ing mangled from _PyCompile_MaybeMangle. Unchecked _PyCompile_PushFBlock in codegen_unwind_fblock_stack (line 669): Return value silently discarded, error lost, frame block stack left inconsistent. compile.c (1,772 lines) — 1 FIX Ref leak of orig in _PyCompile_TweakInlinedComprehensionScopes (line 1096-1114): PyDict_GetItemRef returns new ref in orig, never DECREF'd on any path (success or error). Leaks on every inlined comprehension. assemble.c (802 lines) — 1 FIX assemble_emit_instr returns ERROR without exception (line 420-421): Bytecode overflow check returns ERROR without PyErr_NoMemory() → SystemError. symtable.c (3,355 lines) — 0 FIX (clean) flowgraph.c (4,088 lines) — 0 FIX (clean) Did not fix Ref leak of mangled in codegen_deferred_annotations_body (line 792-818) I do not see a simple way to fix this without overhauling the macros (ADDOP* & VISIT) that can early return Issue: gh-146102 Issue: gh-146442

Open Graph Description: Compiler Pipeline (codegen + compile + symtable + flowgraph + assemble) | 6 FIX codegen.c (6,632 lines) — 4 FIX NULL deref + ref leak in codegen_setup_annotations_scope (line 716-720): PyLong_From...

X Description: Compiler Pipeline (codegen + compile + symtable + flowgraph + assemble) | 6 FIX codegen.c (6,632 lines) — 4 FIX NULL deref + ref leak in codegen_setup_annotations_scope (line 716-720): PyLong_From...

Opengraph URL: https://github.com/python/cpython/pull/146443

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:cb6defec-5e14-472a-2209-f7d9ff4e38b7
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idBD4A:3DAB37:43E9C9F:5E676FE:6A50CC6F
html-safe-noncefaf5e49fde08784c3ccb70ea981d82067ce7f1278d4438f2ae44dc57ceb175c6
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRDRBOjNEQUIzNzo0M0U5QzlGOjVFNjc2RkU6NkE1MENDNkYiLCJ2aXNpdG9yX2lkIjoiMjQ4MzYzODI1ODg2NjYzNzkzNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacfde70f26ce0561ad91be406ea240f1b62f0b4ee75bbb849da9da4e7a7123d32b
hovercard-subject-tagpull_request:3448829302
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/python/cpython/pull/146443/files
twitter:imagehttps://avatars.githubusercontent.com/u/43610414?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/43610414?s=400&v=4
og:image:altCompiler Pipeline (codegen + compile + symtable + flowgraph + assemble) | 6 FIX codegen.c (6,632 lines) — 4 FIX NULL deref + ref leak in codegen_setup_annotations_scope (line 716-720): PyLong_From...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None72b13e0e8d0319acdd27a145cfe73f4f06c791713d0ac4690e41fb68ad28cac0
turbo-cache-controlno-preview
diff-viewunified
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 full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release08e79d53fc070870d5b168356afebb1e286a2ffe
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/146443/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F146443%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
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
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
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/enterprise/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%2Fpull%2F146443%2Ffiles
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%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/pull/146443/files
Reloadhttps://github.com/python/cpython/pull/146443/files
Reloadhttps://github.com/python/cpython/pull/146443/files
Please reload this pagehttps://github.com/python/cpython/pull/146443/files
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/pull/146443/files
Notifications https://github.com/login?return_to=%2Fpython%2Fcpython
Fork 35k https://github.com/login?return_to=%2Fpython%2Fcpython
Star 73.8k 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.3k https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects https://github.com/python/cpython/projects
Security and quality 0 https://github.com/python/cpython/security
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 and quality https://github.com/python/cpython/security
Insights https://github.com/python/cpython/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose
vstinnerhttps://github.com/vstinner
python:mainhttps://github.com/python/cpython/tree/main
A0su:fix_error_handling_and_ref_leaks_in_compilerhttps://github.com/A0su/cpython/tree/fix_error_handling_and_ref_leaks_in_compiler
Conversation 11 https://github.com/python/cpython/pull/146443
Commits 4 https://github.com/python/cpython/pull/146443/commits
Checks 51 https://github.com/python/cpython/pull/146443/checks
Files changed https://github.com/python/cpython/pull/146443/files
Please reload this pagehttps://github.com/python/cpython/pull/146443/files
gh-146442: Fix various bugs in compiler pipeline from bug report https://github.com/python/cpython/pull/146443/files#top
Show all changes 4 commits https://github.com/python/cpython/pull/146443/files
089c19b fix null derefs, missing decrefs, and unchecked returns from bug report A0su Mar 26, 2026 https://github.com/python/cpython/pull/146443/commits/089c19b9268687355697d1c371a28867343f0ca1
aff400a add disclaimer for leaks in codegen_deferred_annotations_body A0su Mar 26, 2026 https://github.com/python/cpython/pull/146443/commits/aff400a0b6ffe5e95caf56e3839019674f6c0682
5b82b94 change to goto error in scope var cleanup and remove uncessary comments A0su Mar 28, 2026 https://github.com/python/cpython/pull/146443/commits/5b82b9416e01def97aa2d4968ed7620efbaa3477
af3a0f9 trim trailing whitespace A0su Mar 28, 2026 https://github.com/python/cpython/pull/146443/commits/af3a0f9c491d15b5ecbafda3f70e78c644684ac7
Clear filters https://github.com/python/cpython/pull/146443/files
Please reload this pagehttps://github.com/python/cpython/pull/146443/files
Please reload this pagehttps://github.com/python/cpython/pull/146443/files
assemble.c https://github.com/python/cpython/pull/146443/files#diff-b784be7a543a2653face407b541812c20b1f75c77c9ee9b109ca2220921d99d0
codegen.c https://github.com/python/cpython/pull/146443/files#diff-6d58b0ddc066ad12ebc378b62c4189335bd57c83aece11072c76fd86a78a1a4a
compile.c https://github.com/python/cpython/pull/146443/files#diff-ebc983d9f91e5bcf73500e377ac65e85863c4f77fd5b6b6caf4fcdf7c0f0b057
https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L230
Python/assemble.chttps://github.com/python/cpython/pull/146443/files#diff-b784be7a543a2653face407b541812c20b1f75c77c9ee9b109ca2220921d99d0
View file https://github.com/A0su/cpython/blob/af3a0f9c491d15b5ecbafda3f70e78c644684ac7/Python/assemble.c
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/146443/{{ revealButtonHref }}
https://github.com/python/cpython/pull/146443/files#diff-b784be7a543a2653face407b541812c20b1f75c77c9ee9b109ca2220921d99d0
https://github.com/python/cpython/pull/146443/files#diff-b784be7a543a2653face407b541812c20b1f75c77c9ee9b109ca2220921d99d0
https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L231
Python/codegen.chttps://github.com/python/cpython/pull/146443/files#diff-6d58b0ddc066ad12ebc378b62c4189335bd57c83aece11072c76fd86a78a1a4a
View file https://github.com/A0su/cpython/blob/af3a0f9c491d15b5ecbafda3f70e78c644684ac7/Python/codegen.c
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/146443/{{ revealButtonHref }}
https://github.com/python/cpython/pull/146443/files#diff-6d58b0ddc066ad12ebc378b62c4189335bd57c83aece11072c76fd86a78a1a4a
https://github.com/python/cpython/pull/146443/files#diff-6d58b0ddc066ad12ebc378b62c4189335bd57c83aece11072c76fd86a78a1a4a
https://github.com/python/cpython/pull/146443/files#diff-6d58b0ddc066ad12ebc378b62c4189335bd57c83aece11072c76fd86a78a1a4a
vstinnerhttps://github.com/vstinner
Mar 30, 2026https://github.com/python/cpython/pull/146443/files#r3011943933
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/146443/files
https://github.com/python/cpython/pull/146443/files#diff-6d58b0ddc066ad12ebc378b62c4189335bd57c83aece11072c76fd86a78a1a4a
https://github.com/python/cpython/pull/146443/files#diff-6d58b0ddc066ad12ebc378b62c4189335bd57c83aece11072c76fd86a78a1a4a
https://github.com/python/cpython/pull/146443/files#diff-6d58b0ddc066ad12ebc378b62c4189335bd57c83aece11072c76fd86a78a1a4a
https://github.com/python/cpython/pull/146443/files#diff-6d58b0ddc066ad12ebc378b62c4189335bd57c83aece11072c76fd86a78a1a4a
https://github.com/python/cpython/pull/146443/files#diff-6d58b0ddc066ad12ebc378b62c4189335bd57c83aece11072c76fd86a78a1a4a
https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L232
Python/compile.chttps://github.com/python/cpython/pull/146443/files#diff-ebc983d9f91e5bcf73500e377ac65e85863c4f77fd5b6b6caf4fcdf7c0f0b057
View file https://github.com/A0su/cpython/blob/af3a0f9c491d15b5ecbafda3f70e78c644684ac7/Python/compile.c
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/146443/{{ revealButtonHref }}
https://github.com/python/cpython/pull/146443/files#diff-ebc983d9f91e5bcf73500e377ac65e85863c4f77fd5b6b6caf4fcdf7c0f0b057
Please reload this pagehttps://github.com/python/cpython/pull/146443/files
https://github.com/python/cpython/pull/146443/files#diff-ebc983d9f91e5bcf73500e377ac65e85863c4f77fd5b6b6caf4fcdf7c0f0b057
Please reload this pagehttps://github.com/python/cpython/pull/146443/files
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.