RFR: 8253588: C1: assert(false) failed: unknown register on x86_32 only with -XX:+TraceLinearScanLevel=4

Christian Hagedorn chagedorn at openjdk.java.net
Mon Oct 12 08:19:11 UTC 2020


On Sat, 10 Oct 2020 00:12:57 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:

>> [JDK-8251093](https://bugs.openjdk.java.net/browse/JDK-8251093) introduced some additional logging of intervals and its
>> registers in various places. On 32-bit only, we could have two registers for an interval. A hi-register is only used
>> when the interval has `_num_phys_regs` set to 2. In one such place
>> ([L5448](https://github.com/chhagedorn/jdk/blob/29ed779487bad3c359fb13dfad3f41832637a470/src/hotspot/share/c1/c1_LinearScan.cpp#L5448)),
>> we log the hi-register `hint_regHi`. On
>> [L5441](https://github.com/chhagedorn/jdk/blob/29ed779487bad3c359fb13dfad3f41832637a470/src/hotspot/share/c1/c1_LinearScan.cpp#L5441),
>> however, we can assign it an invalid register number when `_num_phys_regs` is 1. That was not a problem before
>> JDK-8251093 as we only used `hint_regHi` later after a `_num_phys_regs == 2` check on
>> [L5484](https://github.com/chhagedorn/jdk/blob/29ed779487bad3c359fb13dfad3f41832637a470/src/hotspot/share/c1/c1_LinearScan.cpp#L5484).
>> But the additional logging is performed earlier resulting in this assertion failure when trying to log the invalid
>> `hint_regHi` register.  Thanks, Christian
>
> Good.

Thank you Tobias and Vladimir for your reviews!

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

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


More information about the hotspot-compiler-dev mailing list