René's URL Explorer Experiment


Title: gh-135552: Skip clearing of tp_subclasses weakrefs in GC by sergey-miryanov · Pull Request #136147 · python/cpython · GitHub

Open Graph Title: gh-135552: Skip clearing of tp_subclasses weakrefs in GC by sergey-miryanov · Pull Request #136147 · python/cpython

X Title: gh-135552: Skip clearing of tp_subclasses weakrefs in GC by sergey-miryanov · Pull Request #136147 · python/cpython

Description: Issue: Segmentation fault, possibly due to a GC issue (tp_subclasses) #135552

Open Graph Description: Issue: Segmentation fault, possibly due to a GC issue (tp_subclasses) #135552

X Description: Issue: Segmentation fault, possibly due to a GC issue (tp_subclasses) #135552

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

X: @github

direct link

Domain: github.com

route-pattern/_view_fragments/voltron/pull_requests/show/:user_id/:repository/:id/pull_request_layout(.:format)
route-controllervoltron_pull_requests_fragments
route-actionpull_request_layout
fetch-noncev2:445bdddf-f612-99ba-1084-5202684a885c
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idDFB8:2F3D43:285CFC:349159:696B653D
html-safe-nonce4721d444cd00f3ef2c124392d46fa86a91461424d6699c84bd31ea2c868b8a28
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERkI4OjJGM0Q0MzoyODVDRkM6MzQ5MTU5OjY5NkI2NTNEIiwidmlzaXRvcl9pZCI6IjEyNzczMzAwNTczNTI0MDYzMzMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac54e46bd7cdd3f4cd0a164d26a253162c32baff1086cf0b4f6d657c344be08bcb
hovercard-subject-tagpull_request:2629985039
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///voltron/pull_requests_fragments/pull_request_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/voltron/pull_requests/show/python/cpython/136147/pull_request_layout
twitter:imagehttps://opengraph.githubassets.com/aad57e82371d0c239f2485ba51ceb846bf6136fb83f9b1ab6a675a696c292597/python/cpython/pull/136147
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/aad57e82371d0c239f2485ba51ceb846bf6136fb83f9b1ab6a675a696c292597/python/cpython/pull/136147
og:image:altIssue: Segmentation fault, possibly due to a GC issue (tp_subclasses) #135552
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamesergey-miryanov
hostnamegithub.com
expected-hostnamegithub.com
None5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d
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
release82560a55c6b2054555076f46e683151ee28a19bc
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/136147#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F136147
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%2Fpull%2F136147
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%2Fpull_requests_fragments%2Fpull_request_layout&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/pull/136147
Reloadhttps://github.com/python/cpython/pull/136147
Reloadhttps://github.com/python/cpython/pull/136147
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/pull/136147
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/pull/136147
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
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
Jump to bottomhttps://github.com/python/cpython/pull/136147#issue-comment-box
sergey-miryanovhttps://github.com/sergey-miryanov
python:mainhttps://github.com/python/cpython/tree/main
sergey-miryanov:gh-135552-fix-gc-segfault-2https://github.com/sergey-miryanov/cpython/tree/gh-135552-fix-gc-segfault-2
gh-135552: Skip clearing of tp_subclasses weakrefs in GC https://github.com/python/cpython/pull/136147#top
sergey-miryanovhttps://github.com/sergey-miryanov
python:mainhttps://github.com/python/cpython/tree/main
sergey-miryanov:gh-135552-fix-gc-segfault-2https://github.com/sergey-miryanov/cpython/tree/gh-135552-fix-gc-segfault-2
Conversation 1 https://github.com/python/cpython/pull/136147
Commits 22 https://github.com/python/cpython/pull/136147/commits
Checks 36 https://github.com/python/cpython/pull/136147/checks
Files changed https://github.com/python/cpython/pull/136147/files
Please reload this pagehttps://github.com/python/cpython/pull/136147
https://github.co/hiddenchars
https://github.com/python/cpython/pull/{{ revealButtonHref }}
https://github.com/sergey-miryanov
sergey-miryanovhttps://github.com/sergey-miryanov
Jun 30, 2025https://github.com/python/cpython/pull/136147#issue-3189689154
Please reload this pagehttps://github.com/python/cpython/pull/136147
Segmentation fault, possibly due to a GC issue (tp_subclasses) #135552https://github.com/python/cpython/issues/135552
Please reload this pagehttps://github.com/python/cpython/pull/136147
sergey-miryanovhttps://github.com/sergey-miryanov
June 19, 2025 23:57https://github.com/python/cpython/pull/136147#commits-pushed-f14f0ba
https://github.com/sergey-miryanov
Reset type cache after finalizationhttps://github.com/python/cpython/pull/136147/commits/f14f0badfea9ba005bd01054d3dd49a85639bf5f
f14f0bahttps://github.com/python/cpython/pull/136147/commits/f14f0badfea9ba005bd01054d3dd49a85639bf5f
https://github.com/fxeqxmulfx
Add testshttps://github.com/python/cpython/pull/136147/commits/61fc657b0833d19befe51d54e73c2f2831fa9e11
61fc657https://github.com/python/cpython/pull/136147/commits/61fc657b0833d19befe51d54e73c2f2831fa9e11
https://github.com/sergey-miryanov
Organize testshttps://github.com/python/cpython/pull/136147/commits/d8124a958df2ad12850fe1e8d03dcf79b65ba6c0
d8124a9https://github.com/python/cpython/pull/136147/commits/d8124a958df2ad12850fe1e8d03dcf79b65ba6c0
https://github.com/sergey-miryanov
Remove wrong solutionhttps://github.com/python/cpython/pull/136147/commits/bb215104e47a6ac8b91bba6d901954a77447bf22
bb21510https://github.com/python/cpython/pull/136147/commits/bb215104e47a6ac8b91bba6d901954a77447bf22
https://github.com/sergey-miryanov
Do not clear weakrefs to types before finalization of instanceshttps://github.com/python/cpython/pull/136147/commits/0e649ab0424e69b3e403d1ddc54574ea447fe995
0e649abhttps://github.com/python/cpython/pull/136147/commits/0e649ab0424e69b3e403d1ddc54574ea447fe995
https://github.com/sergey-miryanov
Merge branch 'main' intohttps://github.com/python/cpython/pull/136147/commits/ff79617375deff6c45041ebab05a4f320af75ab5
pythongh-135552https://github.com/python/cpython/issues/135552
-fix-gc-segfaulthttps://github.com/python/cpython/pull/136147/commits/ff79617375deff6c45041ebab05a4f320af75ab5
ff79617https://github.com/python/cpython/pull/136147/commits/ff79617375deff6c45041ebab05a4f320af75ab5
https://github.com/sergey-miryanov
Add newshttps://github.com/python/cpython/pull/136147/commits/ac394bc36fe5a3fc9dbb1d011eee6995b78b92d4
ac394bchttps://github.com/python/cpython/pull/136147/commits/ac394bc36fe5a3fc9dbb1d011eee6995b78b92d4
https://github.com/sergey-miryanov
https://github.com/sobolevn
Update Misc/NEWS.d/next/Core_and_Builtins/2025-06-23-01-07-09.gh-issu…https://github.com/python/cpython/pull/136147/commits/3b1873893a547289252793e6f869f2392d4ee53d
3b18738https://github.com/python/cpython/pull/136147/commits/3b1873893a547289252793e6f869f2392d4ee53d
https://github.com/sergey-miryanov
https://github.com/efimov-mikhail
Update Misc/NEWS.d/next/Core_and_Builtins/2025-06-23-01-07-09.gh-issu…https://github.com/python/cpython/pull/136147/commits/de8841c95cfe80c172bd93fc362f30c56f17477b
de8841chttps://github.com/python/cpython/pull/136147/commits/de8841c95cfe80c172bd93fc362f30c56f17477b
https://github.com/sergey-miryanov
Split unreachable to types and objects while deducehttps://github.com/python/cpython/pull/136147/commits/f8745e0614dc6a47268c7d21239da0865f6cd844
f8745e0https://github.com/python/cpython/pull/136147/commits/f8745e0614dc6a47268c7d21239da0865f6cd844
https://github.com/sergey-miryanov
Merge branch 'https://github.com/python/cpython/pull/136147/commits/f166933fd1a2925225b4656b1474c087b6ab32ce
pythongh-135552https://github.com/python/cpython/issues/135552
-fix-gc-segfault' of github.com:sergey-m…https://github.com/python/cpython/pull/136147/commits/f166933fd1a2925225b4656b1474c087b6ab32ce
f166933https://github.com/python/cpython/pull/136147/commits/f166933fd1a2925225b4656b1474c087b6ab32ce
pythongh-135552https://github.com/python/cpython/issues/135552
https://github.com/sergey-miryanov
Simplify testshttps://github.com/python/cpython/pull/136147/commits/3fe0f152217bd8bdd939c9fb59ce7910db2275ca
3fe0f15https://github.com/python/cpython/pull/136147/commits/3fe0f152217bd8bdd939c9fb59ce7910db2275ca
https://github.com/sergey-miryanov
Merge branch 'main' intohttps://github.com/python/cpython/pull/136147/commits/96f09db63026e25b043fb864282f2155f1c57869
pythongh-135552https://github.com/python/cpython/issues/135552
-fix-gc-segfault-2https://github.com/python/cpython/pull/136147/commits/96f09db63026e25b043fb864282f2155f1c57869
96f09dbhttps://github.com/python/cpython/pull/136147/commits/96f09db63026e25b043fb864282f2155f1c57869
https://github.com/sergey-miryanov
Remove unreachable_types passhttps://github.com/python/cpython/pull/136147/commits/1ad18ecdd66b786cf885fec97ded644357300b67
1ad18echttps://github.com/python/cpython/pull/136147/commits/1ad18ecdd66b786cf885fec97ded644357300b67
https://github.com/apps/bedevere-app
bedevere-apphttps://github.com/apps/bedevere-app
awaiting review https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22awaiting%20review%22
Jun 30, 2025https://github.com/python/cpython/pull/136147#event-18393971652
sergey-miryanovhttps://github.com/sergey-miryanov
July 1, 2025 01:02https://github.com/python/cpython/pull/136147#commits-pushed-bc0297c
https://github.com/sergey-miryanov
Remove obsolete commentshttps://github.com/python/cpython/pull/136147/commits/bc0297ca2e5a65d46abc5ef52b97c15db40af556
bc0297chttps://github.com/python/cpython/pull/136147/commits/bc0297ca2e5a65d46abc5ef52b97c15db40af556
https://github.com/sergey-miryanov
Add is_subclass to PyWeakReference and do not clear those weakrefs in GChttps://github.com/python/cpython/pull/136147/commits/3294f2e4cec9c4705fdd338a8b49b6e1a6c84e9f
3294f2ehttps://github.com/python/cpython/pull/136147/commits/3294f2e4cec9c4705fdd338a8b49b6e1a6c84e9f
https://github.com/sergey-miryanov
sergey-miryanovhttps://github.com/sergey-miryanov
kumaraditya303https://github.com/kumaraditya303
markshannonhttps://github.com/markshannon
code ownershttps://github.com/python/cpython/blob/7e3355845558dd8d488f463b166c2fe6e549f433/.github/CODEOWNERS#L326
June 30, 2025 20:03https://github.com/python/cpython/pull/136147#event-18394017260
https://github.com/sergey-miryanov
sergey-miryanovhttps://github.com/sergey-miryanov
Jun 30, 2025https://github.com/python/cpython/pull/136147#event-18394031177
https://github.com/apps/bedevere-app
bedevere-apphttps://github.com/apps/bedevere-app
Jun 30, 2025 https://github.com/python/cpython/pull/136147#ref-issue-3148205005
Segmentation fault, possibly due to a GC issue (tp_subclasses) #135552 https://github.com/python/cpython/issues/135552
https://github.com/sergey-miryanov
Create weakrefs for subclasses with sentinel callback to properly han…https://github.com/python/cpython/pull/136147/commits/6c45159aeb4df37dc11dd2cc27641993ef72f961
6c45159https://github.com/python/cpython/pull/136147/commits/6c45159aeb4df37dc11dd2cc27641993ef72f961
https://github.com/sergey-miryanov
sergey-miryanovhttps://github.com/sergey-miryanov
ZeroIntensityhttps://github.com/ZeroIntensity
ericsnowcurrentlyhttps://github.com/ericsnowcurrently
code ownershttps://github.com/python/cpython/blob/f41e9c750e6971c165e055374a1014d6afd2d50e/.github/CODEOWNERS#L71
July 1, 2025 18:50https://github.com/python/cpython/pull/136147#event-18417321243
sergey-miryanovhttps://github.com/sergey-miryanov
July 1, 2025 23:53https://github.com/python/cpython/pull/136147#commits-pushed-e5e95ff
https://github.com/sergey-miryanov
Update news entryhttps://github.com/python/cpython/pull/136147/commits/e5e95ffeb1103807b6d274381ba7b44d8da71313
e5e95ffhttps://github.com/python/cpython/pull/136147/commits/e5e95ffeb1103807b6d274381ba7b44d8da71313
https://github.com/sergey-miryanov
Add some commentshttps://github.com/python/cpython/pull/136147/commits/edf634c2078700e509bf19985f59212f8ceb25e3
edf634chttps://github.com/python/cpython/pull/136147/commits/edf634c2078700e509bf19985f59212f8ceb25e3
https://github.com/sergey-miryanov
sergey-miryanovhttps://github.com/sergey-miryanov
July 1, 2025 19:04https://github.com/python/cpython/pull/136147#event-18417551357
https://github.com/apps/bedevere-app
bedevere-apphttps://github.com/apps/bedevere-app
awaiting review https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22awaiting%20review%22
Jul 1, 2025https://github.com/python/cpython/pull/136147#event-18417551988
sergey-miryanovhttps://github.com/sergey-miryanov
July 2, 2025 19:04https://github.com/python/cpython/pull/136147#commits-pushed-bd7d9f3
https://github.com/sergey-miryanov
Crazy idea to use noop-callback as a sentinelhttps://github.com/python/cpython/pull/136147/commits/bd7d9f3f82965da0d36ad65e80bec42f6cf6422c
bd7d9f3https://github.com/python/cpython/pull/136147/commits/bd7d9f3f82965da0d36ad65e80bec42f6cf6422c
https://github.com/sergey-miryanov
Immortalize sentinel callbackhttps://github.com/python/cpython/pull/136147/commits/987f6a38748ccc0df51743c0e47bed35d1b1d20d
987f6a3https://github.com/python/cpython/pull/136147/commits/987f6a38748ccc0df51743c0e47bed35d1b1d20d
https://github.com/sergey-miryanov
Clear weakref sentinel in the right placehttps://github.com/python/cpython/pull/136147/commits/be87675788644b0adc91dd861893dfd7625aca08
be87675https://github.com/python/cpython/pull/136147/commits/be87675788644b0adc91dd861893dfd7625aca08
https://github.com/sergey-miryanov
sergey-miryanovhttps://github.com/sergey-miryanov
Jul 3, 2025https://github.com/python/cpython/pull/136147#issuecomment-3032896786
#136189https://github.com/python/cpython/pull/136189
Please reload this pagehttps://github.com/python/cpython/pull/136147
https://github.com/sergey-miryanov
sergey-miryanovhttps://github.com/sergey-miryanov
Jul 3, 2025https://github.com/python/cpython/pull/136147#event-18456215572
https://github.com/sergey-miryanov
sergey-miryanovhttps://github.com/sergey-miryanov
July 3, 2025 16:37https://github.com/python/cpython/pull/136147#event-18456219191
https://github.com/sergey-miryanov
sergey-miryanovhttps://github.com/sergey-miryanov
Jul 4, 2025 https://github.com/python/cpython/pull/136147#ref-pullrequest-3193757067
gh-135552: Make the GC clear weakrefs later #136189 https://github.com/python/cpython/pull/136189
Sign up for freehttps://github.com/join?source=comment-repo
Sign in to commenthttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F136147
https://github.com/kumaraditya303
kumaraditya303 https://github.com/kumaraditya303
https://github.com/markshannon
markshannon https://github.com/markshannon
https://github.com/ericsnowcurrently
ericsnowcurrently https://github.com/ericsnowcurrently
https://github.com/ZeroIntensity
ZeroIntensity https://github.com/ZeroIntensity
Please reload this pagehttps://github.com/python/cpython/pull/136147
https://github.com/sergey-miryanov
https://github.com/fxeqxmulfx
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.