-
Bug
-
Resolution: Fixed
-
P4
-
11, 17, 18
-
b15
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8274705 | 17.0.2 | Aleksey Shipilev | P4 | Resolved | Fixed | b01 |
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.
$ 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.
- backported by
-
JDK-8274705 Zero: Clear pending JNI exception check in native method handler
- Resolved