RFR: 8292301: [REDO v2] C2 crash when allocating array of size too large [v4]

Vladimir Kozlov kvn at openjdk.org
Fri Sep 23 16:51:23 UTC 2022


On Fri, 23 Sep 2022 07:29:05 GMT, Roland Westrelin <roland at openjdk.org> wrote:

>> src/hotspot/share/opto/macro.cpp line 1384:
>> 
>>> 1382:   // that the call has the expected number of CatchProj nodes (in case the allocation always fails and the fallthrough
>>> 1383:   // path dies).
>>> 1384:   if (valid_length_test != NULL) {
>> 
>> Should we check for TOP too?
>
> valid_length_test is NULL for AllocateNode and not NULL for AllocateArrayNode. PhaseMacroExpand::expand_allocate_common() is shared by the 2 node types and that test is used to differentiate the two. I don't think top is possible here. I also think for simplicity we want to always move the ValidLength input from the AllocateArrayNode to the call.

Got it.

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

PR: https://git.openjdk.org/jdk/pull/10038


More information about the hotspot-compiler-dev mailing list