RFR: 8314225: SIGSEGV in JavaThread::is_lock_owned [v6]
Kevin Walls
kevinw at openjdk.org
Thu May 2 19:40:18 UTC 2024
On Thu, 2 May 2024 00:10:32 GMT, Dean Long <dlong at openjdk.org> wrote:
>> I can follow that logic but ... if it is null then what is this code actually doing? We have determined that the frame does contain locked monitors and so we are transferring them across. How can such a locked monitor have a null object?
>
> I assume it's only for the `fill_in` `realloc_failures` case. But you're right, it doesn't seem very useful. It's just going to look like an unlocked monitor slot in the interpreter frame. We could consider skipping these in `fill_in`, then they won't show up later in `unpack_on_stack`().
fill_in() has previously OK with seeing monitor->owner() == nullptr
so it's already setting dest->set_obj(null) under some conditions.
I see we can handle the null separately and simplify the asserts there.
vframeArrayElement::unpack_on_stack()
Still might retrieve a null, so the asserts there keep the guard against doing the owner check -- I'm not sure if they won't show up there - it loops over the number of elements in the MonitorChunk* so it should see them all?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18940#discussion_r1588258872
More information about the hotspot-dev
mailing list