RFR: 8309209: C2 failed "assert(_stack_guard_state == stack_guard_reserved_disabled) failed: inconsistent state" [v5]

Dean Long dlong at openjdk.org
Thu Jun 29 01:04:57 UTC 2023


On Wed, 28 Jun 2023 21:13:08 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> src/hotspot/cpu/aarch64/interp_masm_aarch64.cpp line 698:
>> 
>>> 696:     // check if already enabled - if so no re-enabling needed
>>> 697:     ldr(rscratch1, Address(rthread, JavaThread::stack_guard_state_offset()));
>>> 698:     cmp(rscratch1, (u1)StackOverflow::stack_guard_enabled);
>> 
>> Not ldrw + cmpw?
>
> I've no idea, I used the code below as the pattern here. @theRealAph reviewed this.

ldrw + cmpw does seem more correct, plus an asset that sizeof _stack_guard_state == 4.  ldr+cmp is only going to work for little-endian, and only as long as the alignment padding between _stack_guard_state and _stack_overflow_limit is all zeroes.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/14669#discussion_r1245971331


More information about the hotspot-compiler-dev mailing list