From 155d7df555fcebc318db89408ef0fffbd95414a0 Mon Sep 17 00:00:00 2001 From: Leonid Mesnik Date: Thu, 13 Nov 2025 23:54:07 +0000 Subject: [PATCH] 8371749: New test serviceability/jvmti/events/VMDeath/AllocatingInVMDeath/TestAllocatingInVMDeath.java fails with -Xcheck:jni Reviewed-by: sspitsyn, amenkov, cjplummer --- .../AllocatingInVMDeath/libTestAllocatingInVMDeath.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/hotspot/jtreg/serviceability/jvmti/events/VMDeath/AllocatingInVMDeath/libTestAllocatingInVMDeath.cpp b/test/hotspot/jtreg/serviceability/jvmti/events/VMDeath/AllocatingInVMDeath/libTestAllocatingInVMDeath.cpp index 5f46d69afa1..93d66bc38bc 100644 --- a/test/hotspot/jtreg/serviceability/jvmti/events/VMDeath/AllocatingInVMDeath/libTestAllocatingInVMDeath.cpp +++ b/test/hotspot/jtreg/serviceability/jvmti/events/VMDeath/AllocatingInVMDeath/libTestAllocatingInVMDeath.cpp @@ -37,6 +37,10 @@ cbVMDeath(jvmtiEnv* jvmti, JNIEnv* jni) { fatal(jni, "Can't find upCall method."); } jni->CallStaticObjectMethod(clz, mid); + if (jni->ExceptionOccurred()) { + jni->ExceptionDescribe(); + fatal(jni, "cbVMDeath: unexpected exception occurred in Java upcall method."); + } } JNIEXPORT jint JNICALL