RFR: 8258243: C2: assert failed ("Bad derived pointer") with -XX:+VerifyRegisterAllocator

Christian Hagedorn chagedorn at openjdk.java.net
Fri Jan 8 14:10:07 UTC 2021


The base pointer verification code in the register allocator checks that a base for a derived constant node is always `NULL`. However, this is not the case if the offset is zero (returns on L1744):
https://github.com/openjdk/jdk/blob/b549cbd39250c5b22c6e863172d18cf247022894/src/hotspot/share/opto/chaitin.cpp#L1740-L1754

This case is added to the verification code which fixes the reported failing testcases.

I additionally added a hello world test to sanity check the `-XX:+VerifyRegisterAllocator` flag.

Thanks,
Christian

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

Commit messages:
 - 8258243: C2: assert failed ("Bad derived pointer") with -XX:+VerifyRegisterAllocator

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

PR: https://git.openjdk.java.net/jdk/pull/2005


More information about the hotspot-compiler-dev mailing list