8213825: assert(false) failed: Non-balanced monitor enter/exit! Likely JNI locking
authorjcm
Wed, 23 Jan 2019 23:24:10 -0800
changeset 53499 ca6f11c5acda
parent 53498 7ad61dce3825
child 53500 f618cfbaf35b
8213825: assert(false) failed: Non-balanced monitor enter/exit! Likely JNI locking Summary: skip sfpt optimization for Load is removed for Java Object's Markword Load. Reviewed-by: kvn, dlong
src/hotspot/share/opto/memnode.cpp
--- a/src/hotspot/share/opto/memnode.cpp	Wed Jan 23 20:25:30 2019 -0800
+++ b/src/hotspot/share/opto/memnode.cpp	Wed Jan 23 23:24:10 2019 -0800
@@ -1532,10 +1532,14 @@
   Node* address = in(MemNode::Address);
   bool progress = false;
 
+  bool addr_mark = ((phase->type(address)->isa_oopptr() || phase->type(address)->isa_narrowoop()) &&
+         phase->type(address)->is_ptr()->offset() == oopDesc::mark_offset_in_bytes());
+
   // Skip up past a SafePoint control.  Cannot do this for Stores because
   // pointer stores & cardmarks must stay on the same side of a SafePoint.
   if( ctrl != NULL && ctrl->Opcode() == Op_SafePoint &&
-      phase->C->get_alias_index(phase->type(address)->is_ptr()) != Compile::AliasIdxRaw ) {
+      phase->C->get_alias_index(phase->type(address)->is_ptr()) != Compile::AliasIdxRaw  &&
+      !addr_mark ) {
     ctrl = ctrl->in(0);
     set_req(MemNode::Control,ctrl);
     progress = true;