RFR: 8317262: LockStack::contains(oop) fails "assert(t->is_Java_thread()) failed: incorrect cast to JavaThread"

David Holmes dholmes at openjdk.org
Sat Oct 7 00:08:55 UTC 2023


On Thu, 5 Oct 2023 01:47:03 GMT, David Holmes <dholmes at openjdk.org> wrote:

> Please review this simple fix to `LockStack::is_owning_thread()` that allows it to be called by a non-JavaThread. Thanks to @pchilano  for the regression test.
> 
> Testing:
> - new regression test
> - runtime/handshake/MixedHandshakeWalkStackTest.java
> - tiers 1-3 sanity
> 
> Thanks

I can't comment on the stackwatermark processing aspect. Just one follow up: ` is_owning_thread` may be leading you astray with the name (it did me!) - it doesn't refer to the ownership of the lock/monitor but the lockStack itself. It would be more clearly named `is_lock_stack_of_current_thread()`.

Thank again for looking at this.

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

PR Comment: https://git.openjdk.org/jdk/pull/16047#issuecomment-1751515646


More information about the hotspot-runtime-dev mailing list