On Tue, 14 Nov 2023 23:04:16 GMT, Sergey Bylokhov <s...@openjdk.org> wrote:

>> Jorn Vernee has updated the pull request with a new target base due to a 
>> merge or a rebase. The pull request now contains 52 commits:
>> 
>>  - Merge branch 'master' into AllowHeapNoLock
>>  - fix type and reformat doc in Linker
>>  - Merge branch 'master' into AllowHeapNoLock
>>  - tweak whitespace
>>  - a -> an
>>  - add note to downcallHandle about passing heap segments by-reference
>>  - Merge branch 'master' into AllowHeapNoLock
>>  - bump up argument counts in TestLargeStub to their maximum
>>  - s390 updates
>>  - add stub size stress test for allowHeap
>>  - ... and 42 more: https://git.openjdk.org/jdk/compare/03db8281...36da79d1
>
> Does the usage of this new API can be checked by something like  -Xcheck:jni? 
> Especially a part when the app still doing some upcalls to the JVM from 
> native when the pin is "active".

@mrserb Upcalls are blocked unless a thread is in the `native` thread state 
[1]. So, if  an upcall happens from a critical function (which doesn't 
transition to the `native` state), the VM will terminate with a fatal error.

[1]: 
https://github.com/openjdk/jdk/blob/d5abe49670d81b9c4749ce777ed6bf2886228f2f/src/hotspot/share/prims/upcallLinker.cpp#L79

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

PR Comment: https://git.openjdk.org/jdk/pull/16201#issuecomment-1811566526

Reply via email to