RFR: 8375209: Strengthen Xcheck:jni for JNI critical regions [v3]

Aleksey Shipilev shade at openjdk.org
Thu Jan 15 12:05:14 UTC 2026


On Thu, 15 Jan 2026 11:50:40 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> Aleksey Shipilev has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Capture bad state at the end of JNI transition, check criticality on JNI function enters
>>   Move the check to native->Java transition
>
> src/hotspot/share/prims/jniCheck.cpp line 218:
> 
>> 216:     tty->print_cr("%s", fatal_other_function_in_critical);
>> 217:     // Ideally the following, but at least AWT code triggers this (ouch!):
>> 218:     // NativeReportJNIFatalError(thr, fatal_other_function_in_critical);
> 
> So it isn't fatal it is still just a warning.

Yeah, so I am undecided if we want to make it a part this PR: should we turn these warnings into fatal? We can do it separately, since it likely requires fixing the JDK code.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/29206#discussion_r2694115296


More information about the hotspot-dev mailing list