[jdk11u-dev] RFR: 8357105: C2: compilation fails with "assert(false) failed: empty program detected during loop optimization"

Antonio Vieiro avieiro at openjdk.org
Mon Aug 18 15:01:14 UTC 2025


Mostly clean backport of [JDK-8357105](https://bugs.openjdk.org/browse/JDK-8357105). Backport is not clean because JDK11 C++ uses `NULL` instead of `nulllptr`.

Tested on Linux with:

tier1 tests:

==============================
Test summary
==============================
   TEST                                              TOTAL  PASS  FAIL ERROR   
   jtreg:test/hotspot/jtreg:tier1                     1497  1497     0     0   
   jtreg:test/jdk:tier1                               1899  1899     0     0   
   jtreg:test/langtools:tier1                         3941  3941     0     0   
   jtreg:test/nashorn:tier1                              0     0     0     0   
   jtreg:test/jaxp:tier1                                 0     0     0     0   
==============================
TEST SUCCESS


The test itself

==============================
Test summary
==============================
   TEST                                              TOTAL  PASS  FAIL ERROR   
   jtreg:test/hotspot/jtreg/compiler/stringopts/TestStackedConcatsAppendUncommonTrap.java
                                                         1     1     0     0   
==============================
TEST SUCCESS


and gtests


==============================
Test summary
==============================
   TEST                                              TOTAL  PASS  FAIL ERROR   
   gtest:all/server                                    504   504     0     0   
==============================
TEST SUCCESS


Reproducing this on 11 requires the additional flags `-XX:+UnlockDiagnosticVMOptions -XX:+AbortVMOnCompilationFailure `. I'm wondering if we want to add these additional flags to the new test too for 11...

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

Commit messages:
 - Backport de454c7faa2a2369d316bbea4407aab4e179c660

Changes: https://git.openjdk.org/jdk11u-dev/pull/3071/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk11u-dev&pr=3071&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8357105
  Stats: 66 lines in 2 files changed: 64 ins; 0 del; 2 mod
  Patch: https://git.openjdk.org/jdk11u-dev/pull/3071.diff
  Fetch: git fetch https://git.openjdk.org/jdk11u-dev.git pull/3071/head:pull/3071

PR: https://git.openjdk.org/jdk11u-dev/pull/3071


More information about the jdk-updates-dev mailing list