Repository navigation
Keep perf trampolines intact during BOLT optimization - #1356
Merged
Merged
Conversation
Member
|
Ugh looking into why this didn't get caught upstream I noticed we're skipping these tests python/cpython#128883 |
Contributor
|
This crash may be caused by the switch to |
Member
|
That may have exposed it, but the issue exists independently |
Contributor
Agreed. llvm/llvm-project#100096 mentions a similar address aliasing issue specific to glibc. The patch seems like a reasonable approach until a fix is made upstream. |
jjhelmus
approved these changes
Oct 21, 2026
zanieb
marked this pull request as ready for review
October 21, 2026 16:26
zanieb
added a commit
to astral-sh/uv
that referenced
this pull request
Oct 21, 2026
The `20261020` `python-build-standalone` release contains Linux x86-64 builds whose perf trampoline bounds can be invalidated by BOLT (astral-sh/python-build-standalone#1356). Skip the entire release during metadata sync and regenerate the embedded metadata so downloads for `3.13.16`, `3.14.8`, and `3.15.0` point to their `20261013` builds. The `20261021` entries for newer patch versions remain unchanged. Stacked on #22802. Co-authored-by: zaniebot <[email protected]>
mkanat
added a commit
to define-lang/define
that referenced
this pull request
Oct 23, 2026
The 20261020 x86-64 Linux builds lose the perf trampoline's end label during BOLT optimization, so any interpreter run with -X perf segfaults at startup. That broke the profiler's CPU mode. Upstream fixed it in 20261021 (astral-sh/python-build-standalone#1356). Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The
20261020Linux x86-64 builds of CPython3.13and3.14can crash when the perf trampoline is enabled with-X perfor-X perf_jit. The trampoline's end marker shares an address with the following function, so BOLT can move the marker independently of the trampoline and invalidate the byte range CPython copies at runtime.Add a padding byte after the end marker and exclude the trampoline from BOLT instrumentation and optimization to keep its code and boundaries intact.