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

Zero: Clear pending JNI exception check in native method handler

XMLWordPrintable

    • b15

        If you run Zero with existing tier1 test, then it would fail like this:

        $ CONF=linux-x86_64-zero-fastdebug make exploded-test TEST=runtime/jni/checked/TestCheckedJniExceptionCheck.java

         stdout: [TEST STARTED
        testSingleCallNoCheck start
        WARNING in native method: JNI call made without checking exceptions when required to from CallVoidMethod
        at java.lang.Object.getClass(java.base/Native Method)
        at java.io.PrintStream.println(java.base/PrintStream.java:1035)
        at TestCheckedJniExceptionCheck.testSingleCallNoCheck(TestCheckedJniExceptionCheck.java:82)
        at TestCheckedJniExceptionCheck.test(TestCheckedJniExceptionCheck.java:66)
        at TestCheckedJniExceptionCheck.main(TestCheckedJniExceptionCheck.java:203)
        testSingleCallNoCheck end

        In other words, there is a warning from the native call to Object.getClass from the test println itself, which it does not expect. This is because Zero does not clear the pending JNI exception check flag. All other (template) interpreter implementation do clear it in native call handlers. So the test rightfully reports the excess warning.

              shade Aleksey Shipilev
              shade Aleksey Shipilev
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: