Commit fabd337
Fix aarch64 SIGSEGV in linkLightWeightFunctionFrame for large frames
Summary:
On aarch64 with Python 3.12, `add_signed_immediate()` can clobber `arch::reg_scratch_0` when the frame offset exceeds 4095 bytes (the maximum for ARM64 ADD/SUB immediates). On Python 3.12, `frame_holder` aliases x12 (it holds `tstate->cframe`), so the subsequent store to `frame_holder->current_frame` writes to a garbage
address, causing a SIGSEGV. This only triggers for functions with large JIT stack frames (>4103 bytes).
Reviewed By: DinoV
Differential Revision: D96482818
fbshipit-source-id: ba4f08643e281ed80776fe8b22b8900aca381eb61 parent 663cf6a commit fabd337
1 file changed
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
828 | 828 | | |
829 | 829 | | |
830 | 830 | | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
831 | 837 | | |
832 | 838 | | |
833 | 839 | | |
| |||
0 commit comments