RFR: 8314225: SIGSEGV in JavaThread::is_lock_owned [v3]
Kevin Walls
kevinw at openjdk.org
Thu May 2 09:01:54 UTC 2024
On Wed, 1 May 2024 21:53:29 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> src/hotspot/share/runtime/thread.cpp line 530:
>>
>>> 528: #endif // ASSERT
>>> 529:
>>> 530: bool Thread::is_lock_owned(address adr) const {
>>
>> Is there any reason not to move this to JavaThread now? Also, I don't think it needs to be virtual.
>
> Good point. Only JavaThread's can own ObjectMonitors.
OK yes - can move that to JavaThread, with just adding one cast in synchronizer.cpp, where
ObjectSynchronizer::FastHashCode(Thread*, oop) uses is_lock_owned.
(ObjectSynchronizer::FastHashCode may be a candidate for taking JavaThread instead, maybe chasing down the users of that is a separate task. 8-) )
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18940#discussion_r1587298837
More information about the hotspot-dev
mailing list