Skip to content

Commit 90de289

Browse files
committed
8254611: x86_32: Call to IRT::at_unwind clobbers rthread after JDK-8253180
Reviewed-by: eosterlund
1 parent c9ca1bb commit 90de289

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/hotspot/cpu/x86/interp_masm_x86.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -988,7 +988,7 @@ void InterpreterMacroAssembler::remove_activation(
988988
const Register rmon = LP64_ONLY(c_rarg1) NOT_LP64(rcx);
989989
// monitor pointers need different register
990990
// because rdx may have the result in it
991-
NOT_LP64(get_thread(rcx);)
991+
NOT_LP64(get_thread(rthread);)
992992

993993
// The below poll is for the stack watermark barrier. It allows fixing up frames lazily,
994994
// that would normally not be safe to use. Such bad returns into unsafe territory of
@@ -1001,6 +1001,7 @@ void InterpreterMacroAssembler::remove_activation(
10011001
push(state);
10021002
call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::at_unwind));
10031003
pop(state);
1004+
NOT_LP64(get_thread(rthread);) // call_VM clobbered it, restore
10041005
bind(fast_path);
10051006

10061007
// get the value of _do_not_unlock_if_synchronized into rdx

0 commit comments

Comments
 (0)