Skip to content

Commit ca93399

Browse files
author
Vladimir Kempik
committed
8267235: [macos_aarch64] InterpreterRuntime::throw_pending_exception messing up LR results in crash
Reviewed-by: akozlov, aph
1 parent b7b6acd commit ca93399

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -678,6 +678,11 @@ void MacroAssembler::call_VM_base(Register oop_result,
678678
// do the call, remove parameters
679679
MacroAssembler::call_VM_leaf_base(entry_point, number_of_arguments, &l);
680680

681+
// lr could be poisoned with PAC signature during throw_pending_exception
682+
// if it was tail-call optimized by compiler, since lr is not callee-saved
683+
// reload it with proper value
684+
adr(lr, l);
685+
681686
// reset last Java frame
682687
// Only interpreter should have to clear fp
683688
reset_last_Java_frame(true);

0 commit comments

Comments
 (0)