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 22:42:21 UTC 2024


On Mon, 8 Apr 2024 13:13:17 GMT, Fredrik Bredberg <fbredberg 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/ppc/sharedRuntime_ppc.cpp line 1660:
> 
>> 1658:     // Check if this is a virtual thread continuation
>> 1659:     Label L_skip_vthread_code;
>> 1660:     __ ld(R0, in_bytes(ContinuationEntry::flags_offset()), R1_SP);
> 
> Change this back to `lwz` since `_flags` is of type `int`.

Doh! Done.

> src/hotspot/cpu/ppc/sharedRuntime_ppc.cpp line 1666:
> 
>> 1664:     Label L_no_warn;
>> 1665:     __ ld(R0, in_bytes(JavaThread::jni_monitor_count_offset()), R16_thread);
>> 1666:     __ cmpwi(CCR0, R0, 0);
> 
> This should be a `cmpdi` since `_jni_monitor_count` is an `intx`.

Good catch! Fixed. Thanks

> src/hotspot/cpu/ppc/sharedRuntime_ppc.cpp line 1691:
> 
>> 1689:     // Check if this is a virtual thread continuation
>> 1690:     Label L_skip_vthread_code;
>> 1691:     __ ld(R0, in_bytes(ContinuationEntry::flags_offset()), R1_SP);
> 
> Change this back to `lwz` since `_flags` is of type `int`.

Done

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18445#discussion_r1556498829
PR Review Comment: https://git.openjdk.org/jdk/pull/18445#discussion_r1556499870
PR Review Comment: https://git.openjdk.org/jdk/pull/18445#discussion_r1556498928


More information about the hotspot-dev mailing list