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

Handle realloc failure pending exception.

Reviewed-by: roland
This commit is contained in:
Jamsheed Mohammed C M 2016-06-06 23:24:46 -07:00
parent fce865ff45
commit 9ead05c2dc
3 changed files with 115 additions and 2 deletions

View file

@ -498,6 +498,19 @@ Deoptimization::UnrollBlock* Deoptimization::fetch_unroll_info_helper(JavaThread
}
#endif
if (thread->frames_to_pop_failed_realloc() > 0 && exec_mode != Unpack_uncommon_trap) {
assert(thread->has_pending_exception(), "should have thrown OOME");
thread->set_exception_oop(thread->pending_exception());
thread->clear_pending_exception();
exec_mode = Unpack_exception;
}
#if INCLUDE_JVMCI
if (thread->frames_to_pop_failed_realloc() > 0) {
thread->set_pending_monitorenter(false);
}
#endif
UnrollBlock* info = new UnrollBlock(array->frame_size() * BytesPerWord,
caller_adjustment * BytesPerWord,
caller_was_method_handle ? 0 : callee_parameters,