On Wed, 31 Mar 2021 05:27:05 GMT, David Holmes <dhol...@openjdk.org> wrote:

>> src/hotspot/share/runtime/handshake.cpp line 485:
>> 
>>> 483:       } else {
>>> 484:         // Asynchronous may block so they may not execute 
>>> ~PreserveExceptionMark before safepointing
>>> 485:         // in outer loop.
>> 
>> Sorry, I don't understand the comment.
>
> I think this relates to why the PEM was moved from the loop-scope to the sync 
> op case only. That said it isn't clear why we need the HM or PEM.

I guess it should be "... must not execute ~PreserveExceptionMark ..."
~PreserveExceptionMark calls _thread->pending_exception() which is an oop and 
that would be illegal as the vm could be at a safepoint when the async 
handshake returns.

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

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

Reply via email to