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

Jamsheed C m jamsheed.c.m at oracle.com
Thu Jun 2 07:36:07 UTC 2016


Hi Roland
On 6/2/2016 1:03 PM, Roland Westrelin wrote:
> Hi Jamsheed,
>
> 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.

Beest Regards
Jamsheed
>
> Roland.
>
> diff --git a/src/share/vm/runtime/deoptimization.cpp b/src/share/vm/runtime/deoptimization.cpp
> --- a/src/share/vm/runtime/deoptimization.cpp
> +++ b/src/share/vm/runtime/deoptimization.cpp
> @@ -497,6 +497,12 @@
>       exec_mode = Unpack_exception;
>     }
>   #endif
> +  if (thread->frames_to_pop_failed_realloc() > 0) {
> +    assert(thread->has_pending_exception(), "should have thrown OOME");
> +    thread->set_exception_oop(thread->pending_exception());
> +    thread->clear_pending_exception();
> +    exec_mode = Unpack_exception;
> +  }
>   
>     UnrollBlock* info = new UnrollBlock(array->frame_size() * BytesPerWord,
>                                         caller_adjustment * BytesPerWord,



More information about the hotspot-compiler-dev mailing list