RFR: 8146416: java.lang.OutOfMemoryError triggers: assert(current_bci == 0) failed: bci isn't zero for do_not_unlock_if_synchronized

Roland Westrelin rwestrel at redhat.com
Thu Jun 2 08:17:23 UTC 2016

>> So given uncommon traps are unaffected and only deopts are, isn't the
>> change below good enough?
> uncommon traps are affected in  JVMCI case. pending exception check is 
> after jvmci lock code.

That code in TemplateInterpreterGenerator::generate_deopt_entry_for()?

  // Check if we need to take lock at entry of synchronized method.
  if (UseJVMCICompiler) {
    Label L;
    __ cmpb(Address(thread, JavaThread::pending_monitorenter_offset()), 0);
    __ jcc(Assembler::zero, L);
    // Clear flag.
    __ movb(Address(thread, JavaThread::pending_monitorenter_offset()), 0);
    // Satisfy calling convention for lock_method().
    __ get_method(rbx);
    // Take lock.
    __ bind(L);


More information about the hotspot-compiler-dev mailing list