changeset 8952:6b67e2bcf2be

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
author jcm
date Wed, 23 Jan 2019 23:24:10 -0800
parents f59f67eb8bc8
children a49d6f06f0d5
files src/share/vm/opto/memnode.cpp
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/opto/memnode.cpp	Mon Mar 18 08:57:23 2019 +0100
+++ b/src/share/vm/opto/memnode.cpp	Wed Jan 23 23:24:10 2019 -0800
@@ -1514,10 +1514,14 @@
   Node* ctrl    = in(MemNode::Control);
   Node* address = in(MemNode::Address);
 
+  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);
   }