René's URL Explorer Experiment


Title: PEP 709 segfault with nested comprehensions plus lambdas · Issue #104404 · python/cpython · GitHub

Open Graph Title: PEP 709 segfault with nested comprehensions plus lambdas · Issue #104404 · python/cpython

X Title: PEP 709 segfault with nested comprehensions plus lambdas · Issue #104404 · python/cpython

Description: This is another crasher related to PEP 709. def f(): [([lambda: x for x in range(4)], lambda: x) for x in range(3)] Stack trace: Details (lldb) bt * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, addres...

Open Graph Description: This is another crasher related to PEP 709. def f(): [([lambda: x for x in range(4)], lambda: x) for x in range(3)] Stack trace: Details (lldb) bt * thread #1, queue = 'com.apple.main-thread', stop...

X Description: This is another crasher related to PEP 709. def f(): [([lambda: x for x in range(4)], lambda: x) for x in range(3)] Stack trace: Details (lldb) bt * thread #1, queue = 'com.apple.main-thread...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"PEP 709 segfault with nested comprehensions plus lambdas","articleBody":"This is another crasher related to PEP 709.\r\n\r\n```python\r\ndef f():\r\n    [([lambda: x for x in range(4)], lambda: x) for x in range(3)]\r\n```\r\n\r\nStack trace:\r\n\r\n\u003cdetails\u003e\r\n\r\n```\r\n(lldb) bt\r\n* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x8)\r\n  * frame #0: 0x00000001001662f0 python.exe`Py_TYPE(ob=0x0000000000000000) at object.h:204:16 [opt]\r\n    frame #1: 0x000000010015d4e0 python.exe`_PyEval_EvalFrameDefault(tstate=\u003cunavailable\u003e, frame=0x0000000100a60020, throwflag=\u003cunavailable\u003e) at bytecodes.c:1398:31 [opt]\r\n    frame #2: 0x0000000100157c00 python.exe`_PyEval_EvalFrame(tstate=\u003cunavailable\u003e, frame=\u003cunavailable\u003e, throwflag=\u003cunavailable\u003e) at pycore_ceval.h:87:16 [opt]\r\n    frame #3: 0x0000000100157b20 python.exe`_PyEval_Vector(tstate=0x0000000100567f50, func=0x0000000100e19910, locals=0x0000000100e2cd70, args=0x0000000000000000, argcount=0, kwnames=0x0000000000000000) at ceval.c:1576:12 [opt]\r\n    frame #4: 0x0000000100157a0c python.exe`PyEval_EvalCode(co=0x0000000100e7a110, globals=0x0000000100e2cd70, locals=0x0000000100e2cd70) at ceval.c:567:21 [opt]\r\n    frame #5: 0x00000001001bcce0 python.exe`run_eval_code_obj(tstate=0x0000000100567f50, co=0x0000000100e7a110, globals=0x0000000100e2cd70, locals=0x0000000100e2cd70) at pythonrun.c:1695:9 [opt]\r\n    frame #6: 0x00000001001bae50 python.exe`run_mod(mod=\u003cunavailable\u003e, filename=\u003cunavailable\u003e, globals=0x0000000100e2cd70, locals=0x0000000100e2cd70, flags=\u003cunavailable\u003e, arena=\u003cunavailable\u003e) at pythonrun.c:1716:19 [opt]\r\n    frame #7: 0x00000001001ba42c python.exe`pyrun_file(fp=0x0000000209e4cd10, filename=0x0000000100e89b60, start=\u003cunavailable\u003e, globals=0x0000000100e2cd70, locals=0x0000000100e2cd70, closeit=1, flags=0x000000016fdff478) at pythonrun.c:1616:15 [opt]\r\n    frame #8: 0x00000001001b99dc python.exe`_PyRun_SimpleFileObject(fp=0x0000000209e4cd10, filename=0x0000000100e89b60, closeit=1, flags=0x000000016fdff478) at pythonrun.c:433:13 [opt]\r\n    frame #9: 0x00000001001b96cc python.exe`_PyRun_AnyFileObject(fp=0x0000000209e4cd10, filename=0x0000000100e89b60, closeit=1, flags=0x000000016fdff478) at pythonrun.c:78:15 [opt]\r\n    frame #10: 0x00000001001d9094 python.exe`pymain_run_file_obj(program_name=0x0000000100e89bd0, filename=0x0000000100e89b60, skip_source_first_line=0) at main.c:360:15 [opt]\r\n    frame #11: 0x00000001001d8c64 python.exe`pymain_run_file(config=0x000000010054a2c0) at main.c:379:15 [opt]\r\n    frame #12: 0x00000001001d8418 python.exe`pymain_run_python(exitcode=0x000000016fdff5dc) at main.c:610:21 [opt]\r\n    frame #13: 0x00000001001d82a0 python.exe`Py_RunMain at main.c:689:5 [opt]\r\n    frame #14: 0x00000001001d8518 python.exe`pymain_main(args=0x000000016fdff640) at main.c:719:12 [opt]\r\n    frame #15: 0x00000001001d855c python.exe`Py_BytesMain(argc=\u003cunavailable\u003e, argv=\u003cunavailable\u003e) at main.c:743:12 [opt]\r\n    frame #16: 0x0000000100003de4 python.exe`main(argc=\u003cunavailable\u003e, argv=\u003cunavailable\u003e) at python.c:15:12 [opt]\r\n    frame #17: 0x000000010086108c dyld`start + 520\r\n```\r\n\r\n\u003c/details\u003e\r\n\r\nInterestingly, this is an interpreter crash, not a compiler crash, even though we never call the function. The crash happens inside `COPY_FREE_VARS`, because the function's `func_closure` is NULL.\r\n\r\nWhen we disassemble it we can see why:\r\n\r\n```\r\n\u003e\u003e\u003e dis.dis(\"\"\"\r\n... def f():\r\n...     [([lambda: x for x in range(4)], lambda: x) for x in range(3)]\r\n... \"\"\")\r\n              0 COPY_FREE_VARS           1\r\n\r\n  0           2 RESUME                   0\r\n\r\n  2           4 LOAD_CONST               0 (\u003ccode object f at 0x104d2b740, file \"\u003cdis\u003e\", line 2\u003e)\r\n              6 MAKE_FUNCTION            0\r\n              8 STORE_NAME               0 (f)\r\n             10 RETURN_CONST             1 (None)\r\n\r\nDisassembly of \u003ccode object f at 0x104d2b740, file \"\u003cdis\u003e\", line 2\u003e:\r\n\u003csnip\u003e\r\n```\r\n\r\nThere is a `COPY_FREE_VARS` at the module scope, but there is no closure to copy at that level.\r\n\r\nStill reproduces with the fix from #104394 applied. cc @carljm \r\n\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-104442\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/JelleZijlstra","@type":"Person","name":"JelleZijlstra"},"datePublished":"2023-05-11T22:36:15.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/104404/cpython/issues/104404"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:2d623377-e860-a2ed-fe1e-ae13871c1c62
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id82D0:1478A3:82973F:B84CB0:696A1558
html-safe-nonce527f540b1f2044bb5d748dfa3e8059a2c44ec6de45db62b0a61ad4d5140605b4
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MkQwOjE0NzhBMzo4Mjk3M0Y6Qjg0Q0IwOjY5NkExNTU4IiwidmlzaXRvcl9pZCI6IjE1Mjg4MTY0MjU2NDYwMzYzMTIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac72ddcff93964debac952ddfd778ab7b49374518f453b7594fb1ddc1b408dbe5b
hovercard-subject-tagissue:1706660961
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/104404/issue_layout
twitter:imagehttps://opengraph.githubassets.com/0d10ced5391f27ed550d244329138a2ac7e504c1e55307b91dbe3fee4df6e4c7/python/cpython/issues/104404
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/0d10ced5391f27ed550d244329138a2ac7e504c1e55307b91dbe3fee4df6e4c7/python/cpython/issues/104404
og:image:altThis is another crasher related to PEP 709. def f(): [([lambda: x for x in range(4)], lambda: x) for x in range(3)] Stack trace: Details (lldb) bt * thread #1, queue = 'com.apple.main-thread', stop...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameJelleZijlstra
hostnamegithub.com
expected-hostnamegithub.com
None34a52bd10bd674f68e5c1b6b74413b79bf2ca20c551055ace3f7cdd112803923
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
releasee8bd37502700f365b18a4d39acf7cb7947e11b1a
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/issues/104404#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F104404
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%2Fissues%2F104404
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%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/issues/104404
Reloadhttps://github.com/python/cpython/issues/104404
Reloadhttps://github.com/python/cpython/issues/104404
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/issues/104404
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/issues/104404
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
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/104404
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/104404
#104442https://github.com/python/cpython/pull/104442
PEP 709 segfault with nested comprehensions plus lambdashttps://github.com/python/cpython/issues/104404#top
#104442https://github.com/python/cpython/pull/104442
https://github.com/carljm
release-blockerhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22release-blocker%22
type-bugAn unexpected behavior, bug, or errorhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-bug%22
https://github.com/JelleZijlstra
https://github.com/JelleZijlstra
JelleZijlstrahttps://github.com/JelleZijlstra
on May 11, 2023https://github.com/python/cpython/issues/104404#issue-1706660961
#104394https://github.com/python/cpython/pull/104394
@carljmhttps://github.com/carljm
gh-104404: fix crasher with nested comprehensions plus lambdas #104442https://github.com/python/cpython/pull/104442
carljmhttps://github.com/carljm
release-blockerhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22release-blocker%22
type-bugAn unexpected behavior, bug, or errorhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-bug%22
Release and Deferred blockers 🚫https://github.com/orgs/python/projects/2
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.