-
Bug
-
Resolution: Fixed
-
P4
-
22
-
b11
-
windows
Running mscapi tests with -Xcheck:jni produces a lot of warnings like:
WARNING in native method: JNI call made without checking exceptions when required to from CallVoidMethodV
at sun.security.mscapi.CKeyStore.loadKeysOrCertificateChains(jdk.crypto.mscapi@22-internal/Native Method)
at sun.security.mscapi.CKeyStore.engineLoad(jdk.crypto.mscapi@22-internal/CKeyStore.java:729)
at sun.security.mscapi.CKeyStore$MY.engineLoad(jdk.crypto.mscapi@22-internal/CKeyStore.java:60)
at java.security.KeyStore.load(java.base@22-internal/KeyStore.java:1500)
Reproducer:
- make test TEST=jdk/sun/security/mscapi JTREG=JAVA_OPTIONS=-Xcheck:jni
- check the resulting JTR files (the tests will pass, the problems are only reported on stdout)
Possible fix:
add JNU_CHECK_EXCEPTION(env) after every CallVoidMethod in loadKeysOrCertificateChains
WARNING in native method: JNI call made without checking exceptions when required to from CallVoidMethodV
at sun.security.mscapi.CKeyStore.loadKeysOrCertificateChains(jdk.crypto.mscapi@22-internal/Native Method)
at sun.security.mscapi.CKeyStore.engineLoad(jdk.crypto.mscapi@22-internal/CKeyStore.java:729)
at sun.security.mscapi.CKeyStore$MY.engineLoad(jdk.crypto.mscapi@22-internal/CKeyStore.java:60)
at java.security.KeyStore.load(java.base@22-internal/KeyStore.java:1500)
Reproducer:
- make test TEST=jdk/sun/security/mscapi JTREG=JAVA_OPTIONS=-Xcheck:jni
- check the resulting JTR files (the tests will pass, the problems are only reported on stdout)
Possible fix:
add JNU_CHECK_EXCEPTION(env) after every CallVoidMethod in loadKeysOrCertificateChains