RFR: JDK-8316756: C2 EA fails with "missing memory path" when encountering unsafe_arraycopy stub call [v3]

Tobias Holenstein tholenstein at openjdk.org
Tue Jan 16 14:02:23 UTC 2024


On Tue, 16 Jan 2024 12:29:57 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:

>> src/hotspot/share/opto/escape.cpp line 4010:
>> 
>>> 4008:       }
>>> 4009:     } else if (n->is_CallLeaf()) {
>>> 4010:       // Runtime calls with narrow memory input (no MergeMem node)
>> 
>> Could we somehow assert here that we have a call with an intended narrow memory input? Directly asserting that this is an unsafe arraycopy might be too specific. But maybe we can add the following sanity check?
>> 
>> n->as_CallLeaf()->adr_type()->is_rawptr()
>
> Okay, it does not always need to be raw memory. But maybe we still want to assert that we have an unsafe arraycopy in this case? If we ever have more valid cases, the assert could easily be adjusted to allow them. 
> 
> But given how close we are to RDP 2, I suggest to go with this general fix and follow up with an RFE to add that assert if you all agree with that.

> Could we somehow assert here that we have a call with an intended narrow memory input? Directly asserting that this is an unsafe arraycopy might be too specific. But maybe we can add the following sanity check?
> 
> ```
> n->as_CallLeaf()->adr_type()->is_rawptr()
> ```

@vnkozlov what do you think?

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/17347#discussion_r1453467079


More information about the hotspot-compiler-dev mailing list