You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
The JIT's patch_aarch64_33rx relocation isn't safe #146128
We can't just combine patch_aarch64_21r and patch_aarch64_12 into one relaxed relocation without a deeper understanding of the control flow, unfortunately. The issue is that the code can can jump into the middle of the two instructions involved in the relocation, and the combined relaxation changes the meaning of that.
This happens with _IS_NONE on debug 3.13 builds for AArch64 Linux, so it's a legitimate concern. We just dodged the bullet because _IS_NONE is never actually emitted (we turn it into a guard).
I think the best course of action is to remove the patch_aarch64_33rx from 3.13, 3.14, and main. Something like this probably belongs in the textual assembly optimization pass, since we actually reason about control flow there.
I'll open the PRs to remove the bug first. If somebody (perhaps from Arm @diegorusso@markshannon?) can prove this relaxation is valuable and wants to add it back on main in that earlier pass, then feel free to do so.
For clarity, and before any more backports:
This is a potential bug, and it can only become a bug with significant changes to bytecodes.c.
It should be fixed for 3.15, as it makes development harder as benign changes might trigger it, which would be hard to diagnose and fix, and the proper fix should also give us a small performance improvement.
I think the risk of a backport introducing much the same problem due to missing relocations means that we should leave 3.13 and 3.14 be.
Activity
GH-146128: Remove the buggy AArch64 "33rx" relocation (#146263)
[3.14] pythonGH-146128: Remove the buggy AArch64 "33rx" relocation (p…
pythonGH-146128: Remove the buggy AArch64 "33rx" relocation (python#1…
pythonGH-146128: Remove the buggy AArch64 "33rx" relocation (python#1…
[3.14] GH-146128: Remove the buggy AArch64 "33rx" relocation (GH-146263…
markshannon commentedon Apr 7, 2026
For clarity, and before any more backports:
This is a potential bug, and it can only become a bug with significant changes to bytecodes.c.
It should be fixed for 3.15, as it makes development harder as benign changes might trigger it, which would be hard to diagnose and fix, and the proper fix should also give us a small performance improvement.
I think the risk of a backport introducing much the same problem due to missing relocations means that we should leave 3.13 and 3.14 be.
[3.13] GH-146128: Remove the buggy AArch64 "33rx" relocation (#146263) (
GH-146128: Fix AArch64 multi-instruction constants and relocations (G…
pythonGH-146128: Remove the buggy AArch64 "33rx" relocation (python#1…
pythonGH-146128: Fix AArch64 multi-instruction constants and relocati…