RFR: 8327743: JVM crash in hotspot/share/runtime/javaThread.cpp - failed: held monitor count should be equal to jni: 0 != 1 [v2]

David Holmes dholmes at openjdk.org
Mon Apr 8 12:35:45 UTC 2024


On Mon, 8 Apr 2024 12:17:10 GMT, Fei Yang <fyang at openjdk.org> wrote:

>> David Holmes has updated the pull request incrementally with two additional commits since the last revision:
>> 
>>  - s/lw/lwu to zero extend flags value
>>  - s/lwz/ld/
>
> src/hotspot/cpu/riscv/sharedRuntime_riscv.cpp line 912:
> 
>> 910:     // Check if this is a virtual thread continuation
>> 911:     Label L_skip_vthread_code;
>> 912:     __ lw(t0, Address(sp, ContinuationEntry::flags_offset()));
> 
> @fbredber : Nit: maybe it's better to use `lwu` here instead of `lw` to load the 32-bit flags? `lw` would do sign-extension for the upper 32 bits which I don't think is wanted in case when we have more meaningful bits in flags. While `lwu` simply zeros the upper 32 bits.

Thanks for the suggestion @RealFYang I have changed it.

> src/hotspot/cpu/riscv/sharedRuntime_riscv.cpp line 939:
> 
>> 937:     // Check if this is a virtual thread continuation
>> 938:     Label L_skip_vthread_code;
>> 939:     __ lw(t0, Address(sp, ContinuationEntry::flags_offset()));
> 
> Similar here.

Fixed

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18445#discussion_r1555735546
PR Review Comment: https://git.openjdk.org/jdk/pull/18445#discussion_r1555736056


More information about the hotspot-dev mailing list