RFR: 8306933: C2: "assert(false) failed: infinite loop" failure [v2]

Roland Westrelin roland at openjdk.org
Wed May 3 08:42:06 UTC 2023


> The assert fires because an infinite loop appears in the graph after
> loop opts are over.
> 
> After loop opts, the `for(;;)` loop contains a null check and a range
> check for `array[i]`. So it's not considered an infinite loop (it has
> exits to uncommon traps). The null check and range check are redundant
> with the one right before the loop: `int v = array2[k];` IGVN can
> optimize it but it doesn't happen until after loop opts when a
> `ConvI2L` for the `array[i]` access is processed as part of post loop
> opts IGVN. The `for(;;)` loop is then emptied and only contains a
> `Loop` and a `Safepoint` nodes.
> 
> I propose removing the assert (at least for now) as I don't see a way
> to guarantee no infinite loop can appear after loop opts.

Roland Westrelin has updated the pull request incrementally with one additional commit since the last revision:

  -XX:+UnlockDiagnosticVMOptions

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/13672/files
  - new: https://git.openjdk.org/jdk/pull/13672/files/f943db9d..2e466f74

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=13672&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=13672&range=00-01

  Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod
  Patch: https://git.openjdk.org/jdk/pull/13672.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/13672/head:pull/13672

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


More information about the hotspot-compiler-dev mailing list