# HG changeset patch # User vkempik # Date 1621525613 0 # Node ID 2d8e910c71e3be9fa39571fca41d007dc39bdde1 # Parent 25016dd2c4cd7115e4da8e50e5f19aa82e5befce 8267235: [macos_aarch64] InterpreterRuntime::throw_pending_exception messing up LR results in crash Reviewed-by: akozlov, aph diff -r 25016dd2c4cd -r 2d8e910c71e3 src/cpu/aarch64/vm/macroAssembler_aarch64.cpp --- a/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp Tue Jun 24 07:10:06 2014 -0700 +++ b/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp Thu May 20 15:46:53 2021 +0000 @@ -644,6 +644,11 @@ // do the call, remove parameters MacroAssembler::call_VM_leaf_base(entry_point, number_of_arguments, &l); + // lr could be poisoned with PAC signature during throw_pending_exception + // if it was tail-call optimized by compiler, since lr is not callee-saved + // reload it with proper value + adr(lr, l); + // reset last Java frame // Only interpreter should have to clear fp reset_last_Java_frame(true);