mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-15 16:44:36 +02:00
8182755: [JVMCI] Deoptimization in synchronized methods can lead to a crash or exception when using EnableJVMCI but not UseJVMCICompiler
Reviewed-by: kvn, thartmann
This commit is contained in:
parent
b0c9129d6c
commit
a908316a65
3 changed files with 6 additions and 6 deletions
|
@ -472,7 +472,7 @@ address TemplateInterpreterGenerator::generate_deopt_entry_for(TosState state,
|
||||||
#if INCLUDE_JVMCI
|
#if INCLUDE_JVMCI
|
||||||
// Check if we need to take lock at entry of synchronized method. This can
|
// Check if we need to take lock at entry of synchronized method. This can
|
||||||
// only occur on method entry so emit it only for vtos with step 0.
|
// only occur on method entry so emit it only for vtos with step 0.
|
||||||
if (UseJVMCICompiler && state == vtos && step == 0) {
|
if (EnableJVMCI && state == vtos && step == 0) {
|
||||||
Label L;
|
Label L;
|
||||||
__ ldr(rscratch1, Address(rthread, Thread::pending_exception_offset()));
|
__ ldr(rscratch1, Address(rthread, Thread::pending_exception_offset()));
|
||||||
__ cbz(rscratch1, L);
|
__ cbz(rscratch1, L);
|
||||||
|
@ -483,7 +483,7 @@ address TemplateInterpreterGenerator::generate_deopt_entry_for(TosState state,
|
||||||
__ bind(L);
|
__ bind(L);
|
||||||
} else {
|
} else {
|
||||||
#ifdef ASSERT
|
#ifdef ASSERT
|
||||||
if (UseJVMCICompiler) {
|
if (EnableJVMCI) {
|
||||||
Label L;
|
Label L;
|
||||||
__ ldr(rscratch1, Address(rthread, Thread::pending_exception_offset()));
|
__ ldr(rscratch1, Address(rthread, Thread::pending_exception_offset()));
|
||||||
__ cbz(rscratch1, L);
|
__ cbz(rscratch1, L);
|
||||||
|
|
|
@ -319,7 +319,7 @@ address TemplateInterpreterGenerator::generate_deopt_entry_for(TosState state, i
|
||||||
#if INCLUDE_JVMCI
|
#if INCLUDE_JVMCI
|
||||||
// Check if we need to take lock at entry of synchronized method. This can
|
// Check if we need to take lock at entry of synchronized method. This can
|
||||||
// only occur on method entry so emit it only for vtos with step 0.
|
// only occur on method entry so emit it only for vtos with step 0.
|
||||||
if (UseJVMCICompiler && state == vtos && step == 0) {
|
if (EnableJVMCI && state == vtos && step == 0) {
|
||||||
Label L;
|
Label L;
|
||||||
Address pending_monitor_enter_addr(G2_thread, JavaThread::pending_monitorenter_offset());
|
Address pending_monitor_enter_addr(G2_thread, JavaThread::pending_monitorenter_offset());
|
||||||
__ ldbool(pending_monitor_enter_addr, Gtemp); // Load if pending monitor enter
|
__ ldbool(pending_monitor_enter_addr, Gtemp); // Load if pending monitor enter
|
||||||
|
@ -331,7 +331,7 @@ address TemplateInterpreterGenerator::generate_deopt_entry_for(TosState state, i
|
||||||
__ bind(L);
|
__ bind(L);
|
||||||
} else {
|
} else {
|
||||||
#ifdef ASSERT
|
#ifdef ASSERT
|
||||||
if (UseJVMCICompiler) {
|
if (EnableJVMCI) {
|
||||||
Label L;
|
Label L;
|
||||||
Address pending_monitor_enter_addr(G2_thread, JavaThread::pending_monitorenter_offset());
|
Address pending_monitor_enter_addr(G2_thread, JavaThread::pending_monitorenter_offset());
|
||||||
__ ldbool(pending_monitor_enter_addr, Gtemp); // Load if pending monitor enter
|
__ ldbool(pending_monitor_enter_addr, Gtemp); // Load if pending monitor enter
|
||||||
|
|
|
@ -257,7 +257,7 @@ address TemplateInterpreterGenerator::generate_deopt_entry_for(TosState state, i
|
||||||
#if INCLUDE_JVMCI
|
#if INCLUDE_JVMCI
|
||||||
// Check if we need to take lock at entry of synchronized method. This can
|
// Check if we need to take lock at entry of synchronized method. This can
|
||||||
// only occur on method entry so emit it only for vtos with step 0.
|
// only occur on method entry so emit it only for vtos with step 0.
|
||||||
if ((UseJVMCICompiler || UseAOT) && state == vtos && step == 0) {
|
if ((EnableJVMCI || UseAOT) && state == vtos && step == 0) {
|
||||||
Label L;
|
Label L;
|
||||||
__ cmpb(Address(thread, JavaThread::pending_monitorenter_offset()), 0);
|
__ cmpb(Address(thread, JavaThread::pending_monitorenter_offset()), 0);
|
||||||
__ jcc(Assembler::zero, L);
|
__ jcc(Assembler::zero, L);
|
||||||
|
@ -270,7 +270,7 @@ address TemplateInterpreterGenerator::generate_deopt_entry_for(TosState state, i
|
||||||
__ bind(L);
|
__ bind(L);
|
||||||
} else {
|
} else {
|
||||||
#ifdef ASSERT
|
#ifdef ASSERT
|
||||||
if (UseJVMCICompiler) {
|
if (EnableJVMCI) {
|
||||||
Label L;
|
Label L;
|
||||||
__ cmpb(Address(r15_thread, JavaThread::pending_monitorenter_offset()), 0);
|
__ cmpb(Address(r15_thread, JavaThread::pending_monitorenter_offset()), 0);
|
||||||
__ jccb(Assembler::zero, L);
|
__ jccb(Assembler::zero, L);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue