[jdk16] RFR: 8258790: C2: Crash on empty macro node list

Vladimir Ivanov vlivanov at openjdk.java.net
Mon Dec 21 19:45:13 UTC 2020


The fix for 8257624 is incomplete: it doesn't cover the case when macro node array becomes empty as a result of multiple nodes removal. In such case, the out-of-bounds access still takes place (at index "-1"). 

Proposed fix is to adjust the index before performing "i > 0" check.    

Testing:
- [x] failing tests
- [ ] hs-precheckin-comp, hs-tier1, hs-tier2

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

Commit messages:
 - 8258790: C2: Crash on empty macro node list

Changes: https://git.openjdk.java.net/jdk16/pull/56/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk16&pr=56&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8258790
  Stats: 8 lines in 1 file changed: 0 ins; 6 del; 2 mod
  Patch: https://git.openjdk.java.net/jdk16/pull/56.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk16 pull/56/head:pull/56

PR: https://git.openjdk.java.net/jdk16/pull/56


More information about the hotspot-compiler-dev mailing list