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

David Holmes dholmes at openjdk.org
Tue Apr 9 21:42:12 UTC 2024


On Tue, 9 Apr 2024 20:27:23 GMT, Patricio Chilano Mateo <pchilanomate at openjdk.org> wrote:

>> David Holmes has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Avoid unnecessary store when count was already zero.
>
> src/hotspot/share/runtime/javaThread.cpp line 929:
> 
>> 927:   }
>> 928: 
>> 929:   if (CheckJNICalls && jni_monitor_count() > 0) {
> 
> Now that we have the else branch above, shouldn't we move this conditional there? Since for the detach mode case we have already released all monitors.

I see what you mean, but I will keep it here just in case something has gone wrong in a release build.

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

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


More information about the hotspot-dev mailing list