JDK-8314116 : C2: assert(false) failed: malformed control flow after JDK-8305636
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 22
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2023-08-10
  • Updated: 2023-09-04
  • Resolved: 2023-08-14
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.
JDK 22
22 b11Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Description
The attached Fuzzer test fails:

```
$ cd 0007/
$ ../build/linux-x86_64-server-fastdebug/images/jdk/bin/java -cp . -XX:-TieredCompilation Test

...
dist dump
---------------------------------------------
   0  3675  If  === 3595 3551  [[ 3457 ]] P=0.999999, C=-1.000000
   1  3457  IfFalse  === 3675  [[ 921 ]] #0 !orig=[1439]
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/home/shipilev/shipilev-jdk/src/hotspot/share/opto/compile.cpp:4008), pid=14082, tid=14099
#  assert(false) failed: malformed control flow
#
# JRE version: OpenJDK Runtime Environment (22.0) (fastdebug build 22-internal-adhoc.shipilev.shipilev-jdk)
# Java VM: OpenJDK 64-Bit Server VM (fastdebug 22-internal-adhoc.shipilev.shipilev-jdk, mixed mode, sharing, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# V  [libjvm.so+0x9804fc]  Compile::final_graph_reshaping()+0x11ac
```

Bisection points to JDK-8305636.
Comments
Changeset: a39ed108 Author: Christian Hagedorn <chagedorn@openjdk.org> Date: 2023-08-14 08:15:02 +0000 URL: https://git.openjdk.org/jdk/commit/a39ed1087b3c188f06c9aa602313f3b9bf20f9c2
14-08-2023

Thanks for checking and confirming that Aleksey!
11-08-2023

Yes, I think all currently found Fuzzer test failures are fixed by two current PRs.
11-08-2023

I've just sent a PR out for this one (unrelated to JDK-8314106). Hopefully, this will fix all the regressions. Maybe you can check if both patches fix all the failing cases that you've observed so far.
11-08-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/15244 Date: 2023-08-11 08:13:57 +0000
11-08-2023

I have more failing Fuzzer tests, but they fall into these two groups: JDK-8314106 and JDK-8314116 (this one). I will re-test failing fuzzer tests once both fixes land, and submit more if those are not the instances of the same two bugs.
10-08-2023

ILW = Malformed graph assertion and recent regression, single fuzzer case, disable compilation of affected method = HLM = P3
10-08-2023

Thanks for reporting this as well. I'm not sure if I can keep up with your pace - but let's hope there are no further regressions from JDK-8305636. I'll have a look.
10-08-2023

I checked it is not the same as JDK-8314106, as the suggested fix from there does not resolve this issue.
10-08-2023