On Mon, 21 Nov 2022 21:44:14 GMT, Serguei Spitsyn <sspit...@openjdk.org> wrote:

>> There is a stack walk in JvmtiExport::post_exception_throw() that has 
>> safepoints in it. This trips up the stack watermark code. This patch adds a 
>> RAII object to JvmtiExport::post_exception_throw() that keeps the thread and 
>> its stack fully processed throughout the function.
>> Testing: tier1-7 of ZGC tests on linux x86_64 debug and manual testing of 
>> the test that failed.
>
> src/hotspot/share/prims/jvmtiExport.cpp line 1969:
> 
>> 1967:   Handle exception_handle(thread, exception);
>> 1968:   KeepStackGCProcessedMark ksgcpm(thread);
>> 1969: 
> 
> Nit: It'd be nice to place a small comment about why it is needed.

+1 I've never even heard of this thing let alone understand when I would need 
to use it.

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

PR: https://git.openjdk.org/jdk/pull/11238

Reply via email to