- Save arguments on stack before calling __asan_handle_no_return in
ThrowExceptionFromContextInternal
- Fix saving arguments on stack before calling __asan_handle_no_return
in RtlCaptureContext for arm64
Commit migrated from https://github.com/dotnet/coreclr/commit/
b039a4c266b3d64549c4a809b7ea28a69b600358
#ifdef HAS_ASAN
// Need to call __asan_handle_no_return explicitly here because we re-intialize RSP before
// throwing exception in ThrowExceptionHelper
+ push_nonvol_reg rdi
+ push_nonvol_reg rsi
call EXTERNAL_C_FUNC(__asan_handle_no_return)
+ pop_nonvol_reg rsi
+ pop_nonvol_reg rdi
#endif
// Save the RBP to the stack so that the unwind can work at the instruction after
#ifdef HAS_ASAN
// Need to call __asan_handle_no_return explicitly here because we re-intialize SP before
// throwing exception in ThrowExceptionHelper
+ push_nonvol_reg "{r0, r1}"
bl EXTERNAL_C_FUNC(__asan_handle_no_return)
+ pop_nonvol_reg "{r0, r1}"
#endif
push_nonvol_reg {r7} /* FP. x64-RBP */
ldr w17, [x0, #(CONTEXT_ContextFlags)]
tbz w17, #CONTEXT_CONTROL_BIT, LOCAL_LABEL(Restore_CONTEXT_FLOATING_POINT)
- stp x0, x1, [sp]
+ stp x0, x1, [sp, -16]!
bl EXTERNAL_C_FUNC(__asan_handle_no_return)
- ldp x0, x1, [sp]
+ ldp x0, x1, [sp], 16
LOCAL_LABEL(Restore_CONTEXT_FLOATING_POINT):
#endif
#ifdef HAS_ASAN
// Need to call __asan_handle_no_return explicitly here because we re-intialize SP before
// throwing exception in ThrowExceptionHelper
+ stp x0, x1, [sp, -16]!
bl EXTERNAL_C_FUNC(__asan_handle_no_return)
+ ldp x0, x1, [sp], 16
#endif
// Save the FP & LR to the stack so that the unwind can work at the instruction after