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: Verify that JIT stencils preserve frame pointer by Fidget-Spinner · Pull Request #146524 · python/cpython

Conversation

@Fidget-Spinner

@Fidget-Spinner Fidget-Spinner commented Mar 27, 2026 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

This PR introduces a lightweight assembly verifier that the JIT does not clobber the frame pointer.

I verified that without #146521 , this will fail JIT compilation on x86-64. Will use CI to test AArch64.

This is expected to fail JIT CI until that PR lands.

  • 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.

SpookyYomo reacted with hooray emoji
All reactions
  • 🎉 1 reaction
@Fidget-Spinner
Verify that JIT stencils preserve frame pointer
fae87b9
@Fidget-Spinner
Fidget-Spinner requested review from brandtbucher, diegorusso and savannahostrowski as code owners March 27, 2026 15:18
@bedevere-app bedevere-app Bot added the awaiting core review label Mar 27, 2026
@bedevere-app bedevere-app Bot mentioned this pull request Mar 27, 2026
Supporting stack unwinding in the JIT compiler #126910
Open
@Fidget-Spinner Fidget-Spinner added the skip news label Mar 27, 2026
Fidget-Spinner added 4 commits March 27, 2026 23:22
@Fidget-Spinner
Update _optimizers.py
776e109
@Fidget-Spinner
Fix lint
8ad1774
@Fidget-Spinner
more linting
8c9fb56
@Fidget-Spinner
Merge remote-tracking branch 'upstream/main' into fp_verifier
a66c8cd
diegorusso
diegorusso approved these changes Mar 27, 2026
View reviewed changes

@diegorusso diegorusso left a comment

Copy link
Copy Markdown
Contributor

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.

LGTM, thanks!

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 Mar 27, 2026
@Fidget-Spinner

Fidget-Spinner commented Mar 27, 2026 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Member Author

Alright! Confirmed all platforms that currently support frame pointers (x64 and AArch64) fail, so this means it does work!

All reactions

Sorry, something went wrong.

Uh oh!

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

Fidget-Spinner added 2 commits March 28, 2026 01:55
@Fidget-Spinner
Merge remote-tracking branch 'upstream/main' into fp_verifier
c3eaa2a
@Fidget-Spinner
Try a fix
bde6c5b
@Fidget-Spinner
Fidget-Spinner requested review from FFY00, ZeroIntensity and ericsnowcurrently as code owners March 27, 2026 18:47
@Fidget-Spinner
PEP 7
3e1199e
@Fidget-Spinner

Fidget-Spinner commented Mar 27, 2026

Copy link
Copy Markdown
Member Author

Just an FYI: discussed with Mark on 26 Mar UK time that we should just remove the clever tricks to get the frame address and use a simple approximate one.

All reactions

Sorry, something went wrong.

Uh oh!

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

Fidget-Spinner added 3 commits March 28, 2026 03:04
@Fidget-Spinner
Revert "PEP 7"
743cc6a
This reverts commit 3e1199e.
@Fidget-Spinner
Revert "Try a fix"
d7a2d30
This reverts commit bde6c5b.
@Fidget-Spinner
Apply Brandt's fix
108ea06
@Fidget-Spinner
Fidget-Spinner requested a review from markshannon as a code owner March 27, 2026 19:07
@Fidget-Spinner

Fidget-Spinner commented Mar 27, 2026 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Member Author

Had to partially revert some of #146521 because the current recursion limit/stack overflow detection is working strangely after that with the JIT. Brandt's suggestion to just whack a Py_NO_INLINE on the function work. Good thing we have the verifier now so that we don't use one of the other recursion check functions and inadvertently introduce this again into the JIT.

All reactions

Sorry, something went wrong.

Uh oh!

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

@Fidget-Spinner
Fidget-Spinner merged commit 1384f02 into python:main Mar 27, 2026
83 checks passed

Uh oh!

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

@bedevere-app bedevere-app Bot removed the awaiting merge label Mar 27, 2026
@Fidget-Spinner
Fidget-Spinner deleted the fp_verifier branch March 27, 2026 19:39
@pablogsal pablogsal mentioned this pull request Apr 4, 2026
gh-130273: Fix traceback color output with unicode characters #142529
Merged
clin1234 pushed a commit to clin1234/cpython that referenced this pull request Apr 16, 2026
@Fidget-Spinner @clin1234
pythongh-126910: Verify that JIT stencils preserve frame pointer (pyt…
04ecc20
…honGH-146524)
ljfp pushed a commit to ljfp/cpython that referenced this pull request Apr 25, 2026
@Fidget-Spinner @ljfp
pythongh-126910: Verify that JIT stencils preserve frame pointer (pyt…
0036cc1
…honGH-146524)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@diegorusso diegorusso diegorusso approved these changes
@brandtbucher brandtbucher Awaiting requested review from brandtbucher brandtbucher is a code owner
@savannahostrowski savannahostrowski Awaiting requested review from savannahostrowski
@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
@markshannon markshannon Awaiting requested review from markshannon markshannon 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

@Fidget-Spinner @diegorusso
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.