RFR: 8314225: SIGSEGV in JavaThread::is_lock_owned [v6]

Dean Long dlong at openjdk.org
Fri May 3 02:22:56 UTC 2024


On Thu, 2 May 2024 19:40:18 GMT, Kevin Walls <kevinw at openjdk.org> wrote:

>> Removal of JavaThread's MonitorChunks member.  This held lock information during deoptimization, but access to it is unnecessary for anything other than the deoptimization itself.
>> 
>> Access to it in is_lock_owned() was racy, and caused rare crashes.
>
> Kevin Walls has updated the pull request incrementally with one additional commit since the last revision:
> 
>   monitor->owner() == nullptr handling in fill_in

src/hotspot/share/runtime/vframeArray.cpp line 97:

> 95:           dest->set_obj(nullptr);
> 96:         } else {
> 97:           assert(!monitor->owner()->is_unlocked(), "object must be null or locked");

Suggestion:

          assert(monitor->owner() != nullptr, "monitor owner must not be null");
          assert(!monitor->owner()->is_unlocked(), "monitor must be locked");

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18940#discussion_r1588608773


More information about the hotspot-dev mailing list