On Thu, 2 Jun 2022 13:47:23 GMT, Johan Sjölén <d...@openjdk.java.net> wrote:

> Please review this PR for fixing JDK-8287281.
> 
> I chose a different solution than the one suggested. Looking at all callers 
> of `Handshake::execute`, it seems that only one depends on `target == 
> current`. The rest special case that by calling `is_handshake_safe_for` and 
> `do_thread` directly.  I converted the only instance of `Handshake::execute` 
> with `target == current` to just directly call `do_thread`.
> 
> Furthermore we now explicitly check for this case in `Handshake::execute` 
> with an assert and document that this should not be done.
> 
> Finally:  Should `VirtualThreadGetThreadClosure` and its `do_thread()` body 
> be inlined instead? We can do this in this PR, imho, but I'm hoping to get 
> some input on this.
> 
> 
> Currently running tier1-5 to check if I'm missing something.

The tests failed and my assumption was wrong: There are other instances of 
handshaking with their own thread as target, We reverse the strategy and call 
`do_thread` directly in `Handshake::execute`.

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

PR: https://git.openjdk.java.net/jdk/pull/8992

Reply via email to