[jdk17] RFR: 8270307: C2: assert(false) failed: bad AD file after JDK-8267687

Yi Yang yyang at openjdk.java.net
Mon Jul 19 06:03:25 UTC 2021


One input of ConvI2L becomes Top, which causes all nodes in the chain becoming Top, but this CMoveLNode does not change, only its input becomes Top.

  Pop  2146  CMoveL  === _  351  1  2149  [[ 2182  2187 ]]   Type:long !orig=810,696,[439],288 !jvms: Test::vMeth @ bci:78 (line 8)
BreakAtNode: _idx=2461 _debug_idx=102702461 orig._idx=2146 orig._debug_idx=92502146
<               < 2146  CMoveL  === _ _  1 _  [[]]   Type:long !orig=810,696,[439],288 !jvms: Test::vMeth @ bci:78 (line 8)
> long           2461  CMoveL  === _  2458  2149  1  [[ 2187  2182 ]]   Type:long !orig=2146,810,696,[439],288 !jvms: Test::vMeth @ bci:78 (line 8)

This CMoveLNode(CMove Binary(.. ..) (Binary .. Con#Top)) can not match any rules in the instruction selection phase and finally hits the assert. The proposed fix disables further optimizations if inputs of CMoveNode are type of Top.

Testing:
- test/hotspot/jtreg/compiler/c2
- github presubmit tests
- attached fuzzer test
- TestCMoveHasTopInput

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

Commit messages:
 - crash

Changes: https://git.openjdk.java.net/jdk17/pull/254/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk17&pr=254&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8270307
  Stats: 62 lines in 2 files changed: 62 ins; 0 del; 0 mod
  Patch: https://git.openjdk.java.net/jdk17/pull/254.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk17 pull/254/head:pull/254

PR: https://git.openjdk.java.net/jdk17/pull/254


More information about the hotspot-compiler-dev mailing list