RFR: 8327963: C2: fix construction of memory graph around Initialize node to prevent incorrect execution if allocation is removed [v8]

Roberto Castañeda Lozano rcastanedalo at openjdk.org
Thu Jun 5 12:10:57 UTC 2025


On Wed, 4 Jun 2025 14:06:46 GMT, Roberto Castañeda Lozano <rcastanedalo at openjdk.org> wrote:

> Thanks, will run some testing and come back with the results.

`compiler/c2/TestVerifyIterativeGVN.java` fails as follows (I tested the PR applied on top of jdk-25+25 but I see the failure also in the [GHA results](https://github.com/rwestrel/jdk/actions/runs/15438508506/job/43452592735)):


#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/home/rocastan/git/views/JDK-8327963-memprojs/open/src/hotspot/share/opto/node.hpp:457), pid=464370, tid=464390
#  assert(is_not_dead(n)) failed: can not use dead node
#
(...)
Current CompileTask:
C2:128    9    b  4       java.lang.reflect.ClassFileFormatVersion::<clinit> (417 bytes)

Stack: [0x000070ba24200000,0x000070ba24300000],  sp=0x000070ba242fae70,  free space=1003k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0x519ad1]  Node::set_req(unsigned int, Node*)+0x251  (node.hpp:457)
V  [libjvm.so+0x17d2d99]  PhaseIterGVN::subsume_node(Node*, Node*)+0x239  (phaseX.cpp:1425)
V  [libjvm.so+0x15feaf4]  InitializeNode::replace_mem_projs_by(Node*, PhaseIterGVN*)+0x1d4  (phaseX.hpp:539)
V  [libjvm.so+0x1532cd7]  PhaseMacroExpand::expand_allocate_common(AllocateNode*, Node*, TypeFunc const*, unsigned char*, Node*)+0x167  (macro.cpp:1316)
V  [libjvm.so+0x153e92e]  PhaseMacroExpand::expand_macro_nodes()+0xc5e  (macro.cpp:2687)
V  [libjvm.so+0xb286e7]  Compile::Optimize()+0xe37  (compile.cpp:2533)
(...)

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

PR Comment: https://git.openjdk.org/jdk/pull/24570#issuecomment-2943934786


More information about the hotspot-compiler-dev mailing list