JDK-8317996 : C2: CTW fail with "assert(false) failed: malformed control flow" with aptconvert-020903.jar
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 22
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • Submitted: 2023-10-12
  • Updated: 2023-10-12
  • Resolved: 2023-10-12
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdResolved
Related Reports
Duplicate :  
Relates :  
Description
Reliably reproduces like this on current tip:

$ export JAVA_HOME=<point to fastdebug build>
$ export PATH=$JAVA_HOME/bin:$PATH
$ cd test/hotspot/jtreg/testlibrary/ctw
$ make
$ cd dist
$ wget https://repo1.maven.org/maven2/aptconvert/aptconvert/020903/aptconvert-020903.jar
$ ./ctw.sh aptconvert-020903.jar 

   0   917  If  === 913 916  [[ 905 ]] P=0,999999, C=-1,000000
   1   905  IfFalse  === 917  [[ 888 ]] #0 !orig=447,381 !jvms: HTMLConverter$ConvertSink::hrefFileName @ bci:73 (line 571)

# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/home/shipilev/shipilev-jdk/src/hotspot/share/opto/compile.cpp:4013), pid=24776, tid=25848
#  assert(false) failed: malformed control flow
#

Current CompileTask:
C2:29288 4044    b  4       fr.pixware.apt.convert.HTMLConverter$ConvertSink::hrefFileName (96 bytes)

Stack: [0x00007f439b2f3000,0x00007f439b3f4000],  sp=0x00007f439b3ef2f0,  free space=1008k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0x982919]  Compile::final_graph_reshaping()+0x1199  (compile.cpp:4013)
V  [libjvm.so+0x983b91]  Compile::Optimize()+0x11f1  (compile.cpp:2466)
V  [libjvm.so+0x985338]  Compile::Compile(ciEnv*, ciMethod*, int, Options, DirectiveSet*)+0x1568  (compile.cpp:854)
V  [libjvm.so+0x7f1e05]  C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x1f5  (c2compiler.cpp:130)
V  [libjvm.so+0x9904a7]  CompileBroker::invoke_compiler_on_method(CompileTask*)+0x477  (compileBroker.cpp:2282)
V  [libjvm.so+0x991387]  CompileBroker::compiler_thread_loop()+0x307  (compileBroker.cpp:1943)
V  [libjvm.so+0xdd2b87]  JavaThread::thread_main_inner()+0x1b7  (javaThread.cpp:720)
V  [libjvm.so+0x17045df]  Thread::call_run()+0x12f  (thread.cpp:220)
Comments
Does not reproduce anymore with the fix for JDK-8308504. Closing as duplicate.
12-10-2023