Skip to content

[3.14] gh-128883: Store ELF perf trampoline templates in read-only data (GH-160366) - #160492

Merged
pablogsal merged 1 commit into
python:3.14from
pablogsal:backport-1ff83ad-3.14
Oct 23, 2026
Merged

pablogsal merged 1 commit into
python:3.14from
pablogsal:backport-1ff83ad-3.14

Conversation

@pablogsal

@pablogsal pablogsal commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

Backport of #160366 to 3.14.

BOLT can change perf trampoline templates in executable sections and cause crashes. Store the ELF templates in .rodata, with the change in Python/asm_trampoline.S for this branch.

(cherry picked from commit 1ff83ad)

…nly data (pythonGH-160366)

CPython copies the trampoline templates into executable memory. Keep the
ELF source in .rodata so BOLT preserves its bytes and boundaries.
(cherry picked from commit 1ff83ad)

Co-authored-by: Zanie Blue <contact@zanie.dev>
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
@pablogsal
pablogsal enabled auto-merge (squash) October 23, 2026 20:09
@pablogsal
pablogsal merged commit 1fa5e07 into python:3.14 Oct 23, 2026
51 checks passed
@pablogsal
pablogsal deleted the backport-1ff83ad-3.14 branch October 23, 2026 20:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants