changeset 54600:ca6f11c5acda

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 7ad61dce3825
children f618cfbaf35b
files src/hotspot/share/opto/memnode.cpp
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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;