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 May 26 09:52:07 UTC 2016

>   with this fix wouldn't we have to eliminate escape analysis based 
> eliminate allocation for
> JvmtiExport ::can_force_early_return too ?

Because of:

    } else if (JvmtiExport::can_force_early_return() && state != NULL && state->is_earlyret_pending()) {
      // Force early return from top frame after deoptimization
#ifndef CC_INTERP
      pc = Interpreter::remove_activation_early_entry(state->earlyret_tos());

in vframeArrayElement::unpack_on_stack()? Good catch indeed.

Maybe changing that test to:

JvmtiExport::can_force_early_return() && state != NULL && state->is_earlyret_pending() && thread->frames_to_pop_failed_realloc() == 0

is good enough. I'm not sure. Testing for JvmtiExport::can_pop_frame():

  if (!EliminateAllocations || JvmtiExport::can_pop_frame() || !alloc->_is_non_escaping) {
    return false;

in PhaseMacroExpand::eliminate_allocate_node() is conservative. Maybe
it's not needed. Someone would need to take a closer look at the
interaction of what we do when we throw OOME during deoptimization and


More information about the hotspot-compiler-dev mailing list