René's URL Explorer Experiment


Title: _PyPegen_raise_error_known_location() uses wrong build format · Issue #95876 · python/cpython · GitHub

Open Graph Title: _PyPegen_raise_error_known_location() uses wrong build format · Issue #95876 · python/cpython

X Title: _PyPegen_raise_error_known_location() uses wrong build format · Issue #95876 · python/cpython

Description: Bug report _PyPegen_raise_error_known_location() uses Py_BuildValue() to generate a tuple for SyntaxError. The format string uses wrong values for all integer constants. lineno, col_number, end_lineno, and end_col_number are Py_ssize_t. ...

Open Graph Description: Bug report _PyPegen_raise_error_known_location() uses Py_BuildValue() to generate a tuple for SyntaxError. The format string uses wrong values for all integer constants. lineno, col_number, end_lin...

X Description: Bug report _PyPegen_raise_error_known_location() uses Py_BuildValue() to generate a tuple for SyntaxError. The format string uses wrong values for all integer constants. lineno, col_number, end_lin...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"_PyPegen_raise_error_known_location() uses wrong build format","articleBody":"# Bug report\r\n\r\n`_PyPegen_raise_error_known_location()` uses `Py_BuildValue()` to generate a tuple for SyntaxError. The format string uses wrong values for all integer constants. lineno, col_number, end_lineno, and end_col_number are Py_ssize_t. The `i` format string handles int. This causes memory corruption on 64bit operation systems with strict ABI (e.g. wasm64).\r\n\r\nhttps://github.com/python/cpython/blob/b9e956fccf60e2083d63bdfa30d7e04c910e94c2/Parser/pegen_errors.c#L373-L376\r\n\r\nI can reliable crash the interpreter with a syntax error like `1+=1`. Notice the `\u003censc object at 0x1>` in the object dump.\r\n\r\n```\r\n$ node --experimental-wasm-memory64 ./python.js -c \"1+=1\"\r\n  File \"\u003cstring>\", line 1\r\nobject address  : 0x973e10\r\nobject refcount : 2\r\nobject type     : 0x2bc868\r\nobject type name: SyntaxError\r\nobject repr     : SyntaxError(\"'literal' is an illegal expression for augmented assignment\", ('\u003cstring>', 1, 0, \u003censc object at 0x1>, 10590200, 0))\r\nlost sys.stderr\r\nAborted(Runtime error: The application has corrupted its heap memory area (address zero)!)\r\nexiting due to exception: RuntimeError: Aborted(Runtime error: The application has corrupted its heap memory area (address zero)!),RuntimeError: Aborted(Runtime error: The application has corrupted its heap memory area (address zero)!)\r\n    at abort (/home/heimes/dev/python/cpython/builddir/wasm64-emscripten-node-debug/python.js:971:11)\r\n    at checkStackCookie (/home/heimes/dev/python/cpython/builddir/wasm64-emscripten-node-debug/python.js:733:47)\r\n    at exitRuntime (/home/heimes/dev/python/cpython/builddir/wasm64-emscripten-node-debug/python.js:800:3)\r\n    at exitJS (/home/heimes/dev/python/cpython/builddir/wasm64-emscripten-node-debug/python.js:7254:9)\r\n    at callMain (/home/heimes/dev/python/cpython/builddir/wasm64-emscripten-node-debug/python.js:9476:5)\r\n    at doRun (/home/heimes/dev/python/cpython/builddir/wasm64-emscripten-node-debug/python.js:9525:23)\r\n    at run (/home/heimes/dev/python/cpython/builddir/wasm64-emscripten-node-debug/python.js:9540:5)\r\n    at runCaller (/home/heimes/dev/python/cpython/builddir/wasm64-emscripten-node-debug/python.js:9448:19)\r\n    at removeRunDependency (/home/heimes/dev/python/cpython/builddir/wasm64-emscripten-node-debug/python.js:936:7)\r\n    at receiveInstance (/home/heimes/dev/python/cpython/builddir/wasm64-emscripten-node-debug/python.js:1106:5)\r\n```\r\n\r\nThe fix is trivial, use `n` instead of `i`. https://docs.python.org/3/c-api/arg.html#c.Py_BuildValue\r\n\r\n# Your environment\r\n\r\nCPython main\r\nwasm64-emscripten (EMSDK 3.1.18) with Node 16","author":{"url":"https://github.com/tiran","@type":"Person","name":"tiran"},"datePublished":"2022-08-11T07:16:59Z","url":"https://github.com/python/cpython/issues/95876"}

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:0e1b5441-92a4-143e-6f88-ecc7bc563637
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idC9C6:14700E:4AE7BBA:5EDFC92:6B02524A
html-safe-nonce1685f1b381b9c121cad98d1f09c32dfc2e13d5cf52fef1f0733aaaf49c78e5e8
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDOUM2OjE0NzAwRTo0QUU3QkJBOjVFREZDOTI6NkIwMjUyNEEiLCJ2aXNpdG9yX2lkIjoiNzMwMzAzNTY3NzQ5MzU4MDM2MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacbd3143566824fe7983a8837b9cf88468b1308eeb954d02e975f879f51c95a2b1
hovercard-subject-tagissue:1335564981
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/95876/issue_layout
twitter:imagehttps://opengraph.githubassets.com/bce770171981742a03a22d5a2c976a5b39e3669cbccb891e302f2fc772a6a934/python/cpython/issues/95876
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/bce770171981742a03a22d5a2c976a5b39e3669cbccb891e302f2fc772a6a934/python/cpython/issues/95876
og:image:altBug report _PyPegen_raise_error_known_location() uses Py_BuildValue() to generate a tuple for SyntaxError. The format string uses wrong values for all integer constants. lineno, col_number, end_lin...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernametiran
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/95876#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F95876
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%2F95876
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/95876
Reloadhttps://github.com/python/cpython/issues/95876
Reloadhttps://github.com/python/cpython/issues/95876
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/95876
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/95876
_PyPegen_raise_error_known_location() uses wrong build formathttps://github.com/python/cpython/issues/95876#top
https://github.com/tiran
https://github.com/pablogsal
3.11only security fixeshttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%223.11%22
3.12only security fixeshttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%223.12%22
type-bugAn unexpected behavior, bug, or errorhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-bug%22
https://github.com/tiran
tiranhttps://github.com/tiran
on Aug 11, 2022https://github.com/python/cpython/issues/95876#issue-1335564981
cpython/Parser/pegen_errors.chttps://github.com/python/cpython/blob/b9e956fccf60e2083d63bdfa30d7e04c910e94c2/Parser/pegen_errors.c#L373-L376
b9e956fhttps://github.com/python/cpython/commit/b9e956fccf60e2083d63bdfa30d7e04c910e94c2
https://docs.python.org/3/c-api/arg.html#c.Py_BuildValuehttps://docs.python.org/3/c-api/arg.html#c.Py_BuildValue
tiranhttps://github.com/tiran
type-bugAn unexpected behavior, bug, or errorhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-bug%22
3.11only security fixeshttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%223.11%22
3.12only security fixeshttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%223.12%22
on Aug 11, 2022https://github.com/python/cpython/issues/95876#event-7169264548
tiranhttps://github.com/tiran
on Aug 11, 2022https://github.com/python/cpython/issues/95876#event-7169264593
tiranhttps://github.com/tiran
on Aug 11, 2022https://github.com/python/cpython/issues/95876#event-7169287839
pythongh-95876: Fix format string in pegen error location codehttps://github.com/tiran/cpython/commit/59c382810e143df0c75b06ff754371c4545847a1
pythongh-95876https://github.com/python/cpython/issues/95876
59c3828https://github.com/tiran/cpython/commit/59c382810e143df0c75b06ff754371c4545847a1
tiranhttps://github.com/tiran
pablogsalhttps://github.com/pablogsal
on Aug 11, 2022https://github.com/python/cpython/issues/95876#event-7169289238
pablogsalhttps://github.com/pablogsal
on Aug 11, 2022https://github.com/python/cpython/issues/95876#event-7169889666
gh-95876: Fix format string in pegen error location code (#95877)https://github.com/python/cpython/commit/b4c857d0fd74abb1ede6fe083c4fa3ca728b2b83
gh-95876https://github.com/python/cpython/issues/95876
#95877https://github.com/python/cpython/pull/95877
b4c857dhttps://github.com/python/cpython/commit/b4c857d0fd74abb1ede6fe083c4fa3ca728b2b83
miss-islingtonhttps://github.com/miss-islington
on Aug 11, 2022https://github.com/python/cpython/issues/95876#event-7169890159
pythongh-95876: Fix format string in pegen error location code (pytho…https://github.com/miss-islington/cpython/commit/383df7b76cde538d0197252d66eae110ada0b899
pythongh-95876https://github.com/python/cpython/issues/95876
pytho…https://github.com/python/cpython/pull/95877
383df7bhttps://github.com/miss-islington/cpython/commit/383df7b76cde538d0197252d66eae110ada0b899
gh-95876: Fix format string in pegen error location code (GH-95877)https://github.com/python/cpython/commit/1221e8c400933f24be69bd156f03cd1411746e6c
gh-95876https://github.com/python/cpython/issues/95876
GH-95877https://github.com/python/cpython/pull/95877
1221e8chttps://github.com/python/cpython/commit/1221e8c400933f24be69bd156f03cd1411746e6c
tiranhttps://github.com/tiran
on Aug 11, 2022https://github.com/python/cpython/issues/95876#event-7174293997
[3.10] pythongh-95876: Fix format string in pegen error location code (…https://github.com/tiran/cpython/commit/98c5309239aa3f7fef7aea601ce9cecf619f8e4a
pythongh-95876https://github.com/python/cpython/issues/95876
…https://github.com/python/cpython/pull/95877
98c5309https://github.com/tiran/cpython/commit/98c5309239aa3f7fef7aea601ce9cecf619f8e4a
miss-islingtonhttps://github.com/miss-islington
on Aug 11, 2022https://github.com/python/cpython/issues/95876#event-7174457648
[3.10] gh-95876: Fix format string in pegen error location code (GH-9…https://github.com/python/cpython/commit/2a6b67f1c516d0e693abd0dc13c7c7799815fd18
gh-95876https://github.com/python/cpython/issues/95876
GH-9…https://github.com/python/cpython/pull/95877
2a6b67fhttps://github.com/python/cpython/commit/2a6b67f1c516d0e693abd0dc13c7c7799815fd18
lysnikolaouhttps://github.com/lysnikolaou
completedhttps://github.com/python/cpython/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Aug 11, 2022https://github.com/python/cpython/issues/95876#event-7174475379
Sign up for freehttps://github.com/signup?return_to=https://github.com/python/cpython/issues/95876
Sign in to commenthttps://github.com/login?return_to=https://github.com/python/cpython/issues/95876
pablogsalhttps://github.com/pablogsal
tiranhttps://github.com/tiran
3.11only security fixeshttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%223.11%22
3.12only security fixeshttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%223.12%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.