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

JNI warnings in SunMSCApi provider

    XMLWordPrintable

Details

    Description

      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

      Attachments

        Issue Links

          Activity

            People

              mpowers Mark Powers
              djelinski Daniel Jelinski
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: