RFR: 8371749: New test serviceability/jvmti/events/VMDeath/AllocatingInVMDeath/TestAllocatingInVMDeath.java fails with -Xcheck:jni

Serguei Spitsyn sspitsyn at openjdk.org
Thu Nov 13 07:04:03 UTC 2025


On Thu, 13 Nov 2025 02:51:35 GMT, Leonid Mesnik <lmesnik at openjdk.org> wrote:

> Please review following fix that adds jni exception check after calling java code. 
> 
> Tested by running test with and without -Xcheck:jni.

test/hotspot/jtreg/serviceability/jvmti/events/VMDeath/AllocatingInVMDeath/libTestAllocatingInVMDeath.cpp line 42:

> 40:   if (jni->ExceptionOccurred()) {
> 41:     jni->ExceptionDescribe();
> 42:     fatal(jni, "Unexpected exception occured in cbVMDeath.");

Nit: Typo: `s/occured/occurred/`
Also, this message is confusing. Unexpected exception occurred in Java upcall made from the cbVMDeath.
Maybe something like this: "cbVMDeath: unexpected exception occurred in Java upcall method".

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

PR Review Comment: https://git.openjdk.org/jdk/pull/28280#discussion_r2521900137


More information about the serviceability-dev mailing list