Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8189766

whitebox failure with -Xcheck:jni

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 11
    • 10, 11
    • hotspot
    • None
    • b16
    • generic
    • generic

        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.

              dholmes David Holmes
              kbarrett Kim Barrett
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: