Commit 85fb1b9
Fix deferred compile trampoline using blr instead of br
Summary:
The AArch64 JitHelpers indirection stub for deferred function compilation used `blr` (branch with link) to call the failed_deferred_compile_trampoline, which clobbered the link register (x30) with the address of the next instruction (the resume entry point). When the trampoline returned, it jumped to the resume entry instead of returning to the original call site in the JIT-compiled function.
The x86 version correctly uses `jmp` (no return address push). Changed the AArch64 version to use `br` (branch without link) to match, preserving the original return address in x30 so the trampoline returns to the correct call site.
This fixes segfaults in async/await tests and other tests involving unjitable functions called from JIT-compiled code (e.g., test_awaited_invoke_function_unjitable).
Reviewed By: kddnewton
Differential Revision: D93875145
fbshipit-source-id: 98126def5763ad2a2103bffb118f76a0634d35461 parent 1f07568 commit 85fb1b9
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2176 | 2176 | | |
2177 | 2177 | | |
2178 | 2178 | | |
2179 | | - | |
| 2179 | + | |
2180 | 2180 | | |
2181 | 2181 | | |
2182 | 2182 | | |
| |||
0 commit comments