From d0afed80e7b59e4315b8d2dedb3d45875320041d Mon Sep 17 00:00:00 2001 From: duke Date: Thu, 20 May 2021 15:55:51 +0000 Subject: [PATCH] Backport ca93399af103384e750dabf3abcc6e8392bcf3f4 --- src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp b/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp index 0414c3c0d4a..b62c7c82232 100644 --- a/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp +++ b/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp @@ -684,6 +684,11 @@ void MacroAssembler::call_VM_base(Register oop_result, // 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);