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

Dean Long dlong at openjdk.org
Thu May 2 00:12:51 UTC 2024


On Wed, 1 May 2024 22:09:54 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> That is fetching from an index in the MonitorChunk* _monitors, so if we recognise null in element->fill_in() when populating MonitorChunk*, seems good to recognise it here in vframeArrayElement::unpack_on_stack()?
>
> 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`().

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

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


More information about the hotspot-dev mailing list