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 07:33:51 UTC 2016


Hi Jamsheed,

So given uncommon traps are unaffected and only deopts are, isn't the
change below good enough?

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