RFR: 8324881: ObjectSynchronizer::inflate(Thread* current...) is invoked for non-current thread [v4]

Daniel D. Daugherty dcubed at openjdk.org
Thu Feb 1 22:55:01 UTC 2024


On Thu, 1 Feb 2024 22:39:02 GMT, Richard Reingruber <rrich at openjdk.org> wrote:

>> I'm confused. The `LockingMode == LM_LEGACY && locking_thread->is_lock_owned((address)prev_owner) == true`
>> case is handled below on L350 -> L355. What am I missing?
>
> With LM_LEGACY `ObjectMonitor::_owner` will either be the JavaThread* of the owner or the BasicLock* in the stack of the owner found in the mark word of the object when the lock gets inflated:
> ```c++
>   void* volatile _owner;            // pointer to owning thread OR BasicLock
> 
> Here at L332 the JavaThread* case is handled. At L350 -> 355 the BasicLock* case is handled.

Ummm... Here's the comment line I'm talking about:
> I thought you would have to handle `LockingMode == LM_LEGACY && locking_thread->is_lock_owned((address)prev_owner) == true`. 

and the code that I referred to on L350 is exactly that line of code. Again, what am I missing?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17626#discussion_r1475272912


More information about the hotspot-dev mailing list