René's URL Explorer Experiment


Title: JIT build fails on macOS 26: due to .cfi directives · Issue #148560 · python/cpython · GitHub

Open Graph Title: JIT build fails on macOS 26: due to .cfi directives · Issue #148560 · python/cpython

X Title: JIT build fails on macOS 26: due to .cfi directives · Issue #148560 · python/cpython

Description: Bug report Bug description: How to reproduce CPython Commit: 4af46b4 (April 15) ./configure --enable-experimental-jit --with-pydebug make The following command fails with the following errors: ❯ make -j1 python3.15 ./Tools/jit/build.py a...

Open Graph Description: Bug report Bug description: How to reproduce CPython Commit: 4af46b4 (April 15) ./configure --enable-experimental-jit --with-pydebug make The following command fails with the following errors: ❯ ma...

X Description: Bug report Bug description: How to reproduce CPython Commit: 4af46b4 (April 15) ./configure --enable-experimental-jit --with-pydebug make The following command fails with the following errors: ❯ ma...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"JIT build fails on macOS 26: due to .cfi directives","articleBody":"# Bug report\n\n### Bug description:\n\n## How to reproduce\n\nCPython Commit: 4af46b4ab5af49d8df034320a9a70fcbb062f7cf (April 15)\n\n```bash\n./configure --enable-experimental-jit --with-pydebug\nmake\n``` \n\nThe following command fails with the following errors:\n\n```\n❯ make -j1\npython3.15 ./Tools/jit/build.py aarch64-apple-darwin25.4.0 --output-dir . --pyconfig-dir . --cflags=\"\" --llvm-version=\"\" --debug\n\n===========================================================\nJIT support for aarch64-apple-darwin is still experimental!\n          Please report any issues you encounter.\n===========================================================\n\n/var/folders/m9/4q7skk_n3vj6k6bvy2vc4tnr0000gn/T/_BINARY_OP_ADD_FLOAT_INPLACE_RIGHT_r13-0ccf97.s:879:1: error: starting new .cfi frame before finishing the previous one\n; %bb.0:\n^\n/var/folders/m9/4q7skk_n3vj6k6bvy2vc4tnr0000gn/T/_BINARY_OP_ADD_FLOAT_INPLACE_RIGHT_r13-0ccf97.s:890:1: error: starting new .cfi frame before finishing the previous one\n; %bb.0:\n^\n/var/folders/m9/4q7skk_n3vj6k6bvy2vc4tnr0000gn/T/_BINARY_OP_ADD_FLOAT_INPLACE_RIGHT_r13-0ccf97.s:901:1: error: starting new .cfi frame before finishing the previous one\n; %bb.0:\n\n...\n\n^\n  + Exception Group Traceback (most recent call last):\n  |   File \"/Users/dm/Projects/cpython-upstream/Tools/jit/_targets.py\", line 213, in _build_stencils\n  |     async with asyncio.TaskGroup() as group:\n  |                ~~~~~~~~~~~~~~~~~^^\n  |   File \"/Users/dm/.local/share/uv/python/cpython-3.15.0a7-macos-aarch64-none/lib/python3.15/asyncio/taskgroups.py\", line 72, in __aexit__\n  |     return await self._aexit(et, exc)\n  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^\n  |   File \"/Users/dm/.local/share/uv/python/cpython-3.15.0a7-macos-aarch64-none/lib/python3.15/asyncio/taskgroups.py\", line 174, in _aexit\n  |     raise BaseExceptionGroup(\n  |     ...\u003c2 lines>...\n  |     ) from None\n  | ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)\n  +-+---------------- 1 ----------------\n    | Traceback (most recent call last):\n    |   File \"/Users/dm/Projects/cpython-upstream/Tools/jit/_targets.py\", line 198, in _compile\n    |     await _llvm.run(\n    |         \"clang\", args_o, echo=self.verbose, llvm_version=self.llvm_version\n    |     )\n    |   File \"/Users/dm/Projects/cpython-upstream/Tools/jit/_llvm.py\", line 132, in run\n    |     output = await maybe_run(tool, args, echo=echo, llvm_version=llvm_version)\n    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n    |   File \"/Users/dm/Projects/cpython-upstream/Tools/jit/_llvm.py\", line 121, in maybe_run\n    |     return path and await _run(path, args, echo=echo)\n    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n    |   File \"/Users/dm/Projects/cpython-upstream/Tools/jit/_llvm.py\", line 63, in _run\n    |     raise RuntimeError(f\"{tool} exited with return code {process.returncode}\")\n    | RuntimeError: clang exited with return code 1\n    +------------------------------------\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n  File \"/Users/dm/Projects/cpython-upstream/./Tools/jit/build.py\", line 55, in \u003cmodule>\n    target.build(\n    ~~~~~~~~~~~~^\n        comment=comment,\n        ^^^^^^^^^^^^^^^^\n        force=args.force,\n        ^^^^^^^^^^^^^^^^^\n        jit_stencils=args.output_dir / f\"jit_stencils-{target.triple}.h\",\n        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n    )\n    ^\n  File \"/Users/dm/Projects/cpython-upstream/Tools/jit/_targets.py\", line 256, in build\n    stencil_groups = ASYNCIO_RUNNER.run(self._build_stencils())\n  File \"/Users/dm/.local/share/uv/python/cpython-3.15.0a7-macos-aarch64-none/lib/python3.15/asyncio/runners.py\", line 127, in run\n    return self._loop.run_until_complete(task)\n           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^\n  File \"/Users/dm/.local/share/uv/python/cpython-3.15.0a7-macos-aarch64-none/lib/python3.15/asyncio/base_events.py\", line 719, in run_until_complete\n    return future.result()\n           ~~~~~~~~~~~~~^^\n  File \"/Users/dm/Projects/cpython-upstream/Tools/jit/_targets.py\", line 211, in _build_stencils\n    with tempfile.TemporaryDirectory() as tempdir:\n         ~~~~~~~~~~~~~~~~~~~~~~~~~~~^^\n  File \"/Users/dm/.local/share/uv/python/cpython-3.15.0a7-macos-aarch64-none/lib/python3.15/tempfile.py\", line 971, in __exit__\n    self.cleanup()\n    ~~~~~~~~~~~~^^\n  File \"/Users/dm/.local/share/uv/python/cpython-3.15.0a7-macos-aarch64-none/lib/python3.15/tempfile.py\", line 975, in cleanup\n    self._rmtree(self.name, ignore_errors=self._ignore_cleanup_errors)\n    ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/dm/.local/share/uv/python/cpython-3.15.0a7-macos-aarch64-none/lib/python3.15/tempfile.py\", line 955, in _rmtree\n    _shutil.rmtree(name, onexc=onexc)\n    ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^\n  File \"/Users/dm/.local/share/uv/python/cpython-3.15.0a7-macos-aarch64-none/lib/python3.15/shutil.py\", line 852, in rmtree\n    _rmtree_impl(path, dir_fd, onexc)\n    ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/dm/.local/share/uv/python/cpython-3.15.0a7-macos-aarch64-none/lib/python3.15/shutil.py\", line 721, in _rmtree_safe_fd\n    _rmtree_safe_fd_step(stack, onexc)\n    ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^\n  File \"/Users/dm/.local/share/uv/python/cpython-3.15.0a7-macos-aarch64-none/lib/python3.15/shutil.py\", line 802, in _rmtree_safe_fd_step\n    onexc(func, path, err)\n    ~~~~~^^^^^^^^^^^^^^^^^\n  File \"/Users/dm/.local/share/uv/python/cpython-3.15.0a7-macos-aarch64-none/lib/python3.15/shutil.py\", line 753, in _rmtree_safe_fd_step\n    os.rmdir(name, dir_fd=dirfd)\n    ~~~~~~~~^^^^^^^^^^^^^^^^^^^^\nOSError: [Errno 66] Directory not empty: '/var/folders/m9/4q7skk_n3vj6k6bvy2vc4tnr0000gn/T/tmpjlgkd9jf'\nmake: *** [jit_stencils-aarch64-apple-darwin.h] Error 1\n```\n\n\n## Root cause\n\n\u003cdetails>\n\u003csummary>\nWarning: this analysis was performed by Claude, and seemed plausible, but that's not my area of expertise.\n\u003c/summary>\n\nLLVM 21's machine outliner (enabled by `-Os`) generates `_OUTLINED_FUNCTION_*` thunks at the end of the assembly output. Each thunk has `.cfi_startproc` but no matching `.cfi_endproc`:\n\n```asm\n_OUTLINED_FUNCTION_1:                   ; @OUTLINED_FUNCTION_1 Thunk\n\t.cfi_startproc\n; %bb.0:\n\t...\n\tb\t___assert_rtn\n_OUTLINED_FUNCTION_2:                   ; @OUTLINED_FUNCTION_2 Thunk\n\t.cfi_startproc          ; \u003c-- ERROR: previous .cfi frame never ended\n; %bb.0:\n\t...\n```\n\nThe Xcode 26 assembler (Apple clang 21.0.0 / clang-2100) is stricter about nested `.cfi` frames than previous versions. CPython CI passes because it runs on macOS 15 with an older Xcode.\n\nNote that `-fno-asynchronous-unwind-tables` is already passed during compilation, so the `.cfi` directives in these outlined thunks serve no purpose — the outliner just emits them unconditionally.\n\n\u003c/details>\n\n## Environnement\n\n- macOS 26.4.1 (Darwin 25.4.0), aarch64\n- Xcode 26.4\n- LLVM 21.1.8 via Homebrew (`brew install llvm@21`)\n\n## Patch\n\nApplying the following (Claude-generated) patch worked on my computer:\n\n```diff\n--- a/Tools/jit/_targets.py\n+++ b/Tools/jit/_targets.py\n@@ -167,6 +167,9 @@\n             # nicer debugging experience... but that needs a lot more research:\n             \"-fno-asynchronous-unwind-tables\",\n+            # The machine outliner can generate outlined thunks with\n+            # .cfi_startproc but no .cfi_endproc, causing assembler errors\n+            # on newer toolchains (e.g. Xcode 26 / macOS 26):\n+            \"-mno-outline\",\n             # Don't call built-in functions that we can't find or patch:\n             \"-fno-builtin\",\n```\n\n## Relevant issues\n\n- https://github.com/python/cpython/issues/145098\n\n### CPython versions tested on:\n\nCPython main branch\n\n### Operating systems tested on:\n\nmacOS\n\n\u003c!-- gh-linked-prs -->\n### Linked PRs\n* gh-148703\n\u003c!-- /gh-linked-prs -->\n","author":{"url":"https://github.com/DarkaMaul","@type":"Person","name":"DarkaMaul"},"datePublished":"2026-04-14T15:38:59Z","url":"https://github.com/python/cpython/issues/148560"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:dc4a4ca0-5dcb-8fd3-7047-e99a8d809a71
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idD308:39914:2F917D:417393:6AECC9E1
html-safe-nonce68e0861d5c969bbff74b797bdcf9a6e29368695b06a3e4252d142e28ce4a760a
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMzA4OjM5OTE0OjJGOTE3RDo0MTczOTM6NkFFQ0M5RTEiLCJ2aXNpdG9yX2lkIjoiNzc1MDQxNzk0MzY5Nzg2OTI4MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac751f679d5f6abde606f5adb2b1c148689b64cea864fc1eee03aa699435c02ade
hovercard-subject-tagissue:4263174800
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/148560/issue_layout
twitter:imagehttps://opengraph.githubassets.com/cc7181d8bf115134a1507e4bdd6938cae4d43c030e8b9cb20062bd2f019d93d7/python/cpython/issues/148560
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/cc7181d8bf115134a1507e4bdd6938cae4d43c030e8b9cb20062bd2f019d93d7/python/cpython/issues/148560
og:image:altBug report Bug description: How to reproduce CPython Commit: 4af46b4 (April 15) ./configure --enable-experimental-jit --with-pydebug make The following command fails with the following errors: ❯ ma...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameDarkaMaul
hostnamegithub.com
expected-hostnamegithub.com
Nonedc0b519c5798dc1150b88dc4c06a8b9634d0069218dc04e469970e76aad74016
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
releasedb139f0bf57b59bf9a8c4abb0849924d6c6ca559
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/python/cpython/issues/148560#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F148560
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%2F148560
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/148560
Reloadhttps://github.com/python/cpython/issues/148560
Reloadhttps://github.com/python/cpython/issues/148560
pythonhttps://github.com/python
cpythonhttps://github.com/python/cpython
Codehttps://github.com/python/cpython
Issues5k+ (5k+)https://github.com/python/cpython/issues
Pull requests2.3k (2.3k)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/pulse
https://github.com/python/cpython
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/148560
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/148560
JIT build fails on macOS 26: due to .cfi directiveshttps://github.com/python/cpython/issues/148560#top
https://github.com/savannahostrowski
OS-machttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22OS-mac%22
buildThe build process and cross-buildhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22build%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
https://github.com/DarkaMaul
DarkaMaulhttps://github.com/DarkaMaul
on Apr 14, 2026https://github.com/python/cpython/issues/148560#issue-4263174800
4af46b4https://github.com/python/cpython/commit/4af46b4ab5af49d8df034320a9a70fcbb062f7cf
CI: move Apple Silicon macOS workflows to macos-26 (Tahoe) #145098https://github.com/python/cpython/issues/145098
GH-148560: Don't emit unwind info for JIT stencils #148703https://github.com/python/cpython/pull/148703
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 14, 2026https://github.com/python/cpython/issues/148560#event-24494196703
https://github.com/savannahostrowski
savannahostrowskihttps://github.com/savannahostrowski
on Apr 14, 2026https://github.com/python/cpython/issues/148560#issuecomment-4245382053
#146475https://github.com/python/cpython/issues/146475
#146478https://github.com/python/cpython/pull/146478
#148364https://github.com/python/cpython/pull/148364
https://github.com/DarkaMaul
DarkaMaulhttps://github.com/DarkaMaul
on Apr 14, 2026https://github.com/python/cpython/issues/148560#issuecomment-4245607533
picnixzhttps://github.com/picnixz
OS-machttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22OS-mac%22
buildThe build process and cross-buildhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22build%22
topic-JIThttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22topic-JIT%22
on Apr 15, 2026https://github.com/python/cpython/issues/148560#event-24525597578
savannahostrowskihttps://github.com/savannahostrowski
on Apr 15, 2026https://github.com/python/cpython/issues/148560#event-24542688852
https://github.com/savannahostrowski
savannahostrowskihttps://github.com/savannahostrowski
on Apr 15, 2026https://github.com/python/cpython/issues/148560#issuecomment-4255095783
gh-146475: Block Apple LLVM 21 from passing JIT tool version check #146478https://github.com/python/cpython/pull/146478
GH-146475: Strip CFI directives from JIT stencils to allow using Apple LLVM 21 #148364https://github.com/python/cpython/pull/148364
https://github.com/diegorusso
diegorussohttps://github.com/diegorusso
on Apr 23, 2026https://github.com/python/cpython/issues/148560#issuecomment-4304337272
#148560https://github.com/python/cpython/issues/148560
savannahostrowskihttps://github.com/savannahostrowski
completedhttps://github.com/python/cpython/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Apr 23, 2026https://github.com/python/cpython/issues/148560#event-24802863892
Sign up for freehttps://github.com/signup?return_to=https://github.com/python/cpython/issues/148560
Sign in to commenthttps://github.com/login?return_to=https://github.com/python/cpython/issues/148560
savannahostrowskihttps://github.com/savannahostrowski
OS-machttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22OS-mac%22
buildThe build process and cross-buildhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22build%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
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.