RFR(XS): 8202123: C2 Crash in Node::in(unsigned int) const+0x14

Roland Westrelin rwestrel at redhat.com
Mon Jul 9 14:14:19 UTC 2018


Hi Tobias,

Thanks for looking at this.

> Why are we not able to figure out that counts != arr? Shouldn't EA
> even remove the allocation and scalar replace counts?

The allocation is found to be non escaping but in
ConnectionGraph::adjust_scalar_replaceable_state():

    // 4. An object is not scalar replaceable if it has a field with unknown
    // offset (array's element is accessed in loop).
    if (offset == Type::OffsetBot) {
      jobj->set_scalar_replaceable(false);
      return;
    }

so it's set to non scalar replaceable which prevents
ConnectionGraph::split_unique_types() from running and an instance_id to
be assigned to the allocation. MemNode::optimize_memory_chain() doesn't
seem to do much unless a pointer is is_known_instance_field() which
requires an _instance_id.

Roland.


More information about the hotspot-compiler-dev mailing list