GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GH-126910: Build/link the JIT shim in the Python interpreter by diegorusso · Pull Request #148872 · python/cpython

Conversation

@diegorusso

@diegorusso diegorusso commented Apr 22, 2026 •
edited by bedevere-app Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

There are various reason why we want to do this but the main is to help simplifying #146071

The _PyJIT symbol (the shim) is now part of the python interpreter with its eh_frame and gdb can see it as normal symbol. There is no need to compile/emit code/eh_frame at runtime as this is done at build time.

  • Issue: Supporting stack unwinding in the JIT compiler #126910

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@diegorusso
pythonGH-126910: Build/link the JIT shim in the Python interpreter
dee6775
@diegorusso
diegorusso requested review from a team, AA-Turner, FFY00, ZeroIntensity, brandtbucher, corona10, emmatyping, ericsnowcurrently, erlend-aasland, markshannon and savannahostrowski as code owners April 22, 2026 10:06
@bedevere-app bedevere-app Bot added the awaiting core review label Apr 22, 2026
@bedevere-app bedevere-app Bot mentioned this pull request Apr 22, 2026
Supporting stack unwinding in the JIT compiler #126910
Open
@diegorusso
Fix build errors on macOS and Windows
7cdcf1b
@diegorusso diegorusso added the skip news label Apr 22, 2026
diegorusso added 3 commits April 22, 2026 16:28
@diegorusso
Fix configure
b2dfa77
@diegorusso
Fix configure
a290072
@diegorusso
Fix free-threading build
91329e2
@diegorusso

diegorusso commented Apr 23, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

eh_frame of the shim is now present in the python binary

$ nm -an python | grep ' _PyJIT$'
000000000035e5b8 T _PyJIT

$ readelf --debug-dump=frames-interp python | grep -A4 -B1 '35e5b8'
  0xffffffffffdbbf88 (offset: 0x35d568) -> 0x66f08 fde=[ 564a0]
  0xffffffffffdbcfd8 (offset: 0x35e5b8) -> 0x66f4c fde=[ 564e4]
  0xffffffffffdbd060 (offset: 0x35e640) -> 0x66fc0 fde=[ 56558]
  0xffffffffffdbd1c4 (offset: 0x35e7a4) -> 0x6701c fde=[ 565b4]
  0xffffffffffdbd2e0 (offset: 0x35e8c0) -> 0x67050 fde=[ 565e8]
  0xffffffffffdbd3cc (offset: 0x35e9ac) -> 0x67088 fde=[ 56620]
--

000564e4 0000000000000070 00000018 FDE cie=000564d0 pc=000000000035e5b8..000000000035e634
   LOC           CFA      x19   x20   x21   x22   x23   x24   x25   x26   x27   x28   x29   ra    v8    v9    v10   v11   v12   v13   v14   v15
000000000035e5b8 sp+0     u     u     u     u     u     u     u     u     u     u     u     u     u     u     u     u     u     u     u     u
000000000035e5bc sp+160   u     u     u     u     u     u     u     u     u     u     u     u     u     u     u     u     u     u     u     u
000000000035e5e4 x29+96   c-8   c-16  c-24  c-32  c-40  c-48  c-56  c-64  c-72  c-80  c-96  c-88  c-104 c-112 c-120 c-128 c-136 c-144 c-152 c-160
000000000035e608 sp+160   c-8   c-16  c-24  c-32  c-40  c-48  c-56  c-64  c-72  c-80  c-96  c-88  c-104 c-112 c-120 c-128 c-136 c-144 c-152 c-160
000000000035e630 sp+0     u     u     u     u     u     u     u     u     u     u     u     u     u     u     u     u     u     u     u     u
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

markshannon
markshannon approved these changes Apr 23, 2026
View reviewed changes

@markshannon markshannon left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting core review labels Apr 23, 2026
@diegorusso
diegorusso merged commit 9633c52 into python:main Apr 23, 2026
134 of 137 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the awaiting merge label Apr 23, 2026
@diegorusso diegorusso mentioned this pull request Apr 23, 2026
GH-148560: Don't emit unwind info for JIT stencils #148703
Closed
ljfp pushed a commit to ljfp/cpython that referenced this pull request Apr 25, 2026
@diegorusso @ljfp
pythonGH-126910: Build/link the JIT shim in the Python interpreter (p…
414a501
…ython#148872)
@ned-deily ned-deily mentioned this pull request May 4, 2026
JIT shim build changes in #148872 can cause build steps to be unnecessarily repeated and with possible build breakage #149353
Closed
@diegorusso
diegorusso deleted the jit-linked-shim branch May 5, 2026 08:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@markshannon markshannon markshannon approved these changes
@ericsnowcurrently ericsnowcurrently Awaiting requested review from ericsnowcurrently ericsnowcurrently is a code owner
@ZeroIntensity ZeroIntensity Awaiting requested review from ZeroIntensity ZeroIntensity is a code owner
@FFY00 FFY00 Awaiting requested review from FFY00 FFY00 is a code owner
@brandtbucher brandtbucher Awaiting requested review from brandtbucher brandtbucher is a code owner
@savannahostrowski savannahostrowski Awaiting requested review from savannahostrowski
@erlend-aasland erlend-aasland Awaiting requested review from erlend-aasland erlend-aasland is a code owner
@AA-Turner AA-Turner Awaiting requested review from AA-Turner AA-Turner is a code owner
@emmatyping emmatyping Awaiting requested review from emmatyping emmatyping is a code owner
@corona10 corona10 Awaiting requested review from corona10 corona10 is a code owner

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

skip news

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@diegorusso @markshannon
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.