Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8204437 | 11.0.1 | David Holmes | P2 | Resolved | Fixed | team |
I wanted to test some changes to code used when -Xcheck:jni is used, so tried specifying that option for jtreg using -javaoption:'-Xcheck:jni'. However, this causes jtreg to fail when using a fastdebug build, with an assert that there is a pending jni exception.
See the attached hs_err_pid10572.log
The backtrace indicates we're in WB_GetBooleanVMFlag, exiting from its ThreadToNativeFromVM scoped object, whose destructor asserts there are no pending jni exceptions.
WB_GetBooleanVMFlag calls boxBoolean, which calls box. box calls (1) env->FindClass, which succeeds (2) env->GetStaticMethodID, which succeeds (3) env->CallStaticObjectMethod, which fails, causing box (and so boxBoolean) to return NULL with a pending jni exception.
I didn't get very far trying to figure out why CallStaticObjectMethod was failing.
See the attached hs_err_pid10572.log
The backtrace indicates we're in WB_GetBooleanVMFlag, exiting from its ThreadToNativeFromVM scoped object, whose destructor asserts there are no pending jni exceptions.
WB_GetBooleanVMFlag calls boxBoolean, which calls box. box calls (1) env->FindClass, which succeeds (2) env->GetStaticMethodID, which succeeds (3) env->CallStaticObjectMethod, which fails, causing box (and so boxBoolean) to return NULL with a pending jni exception.
I didn't get very far trying to figure out why CallStaticObjectMethod was failing.
- backported by
-
JDK-8204437 whitebox failure with -Xcheck:jni
-
- Resolved
-