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

Assert privileges while reading the jdk.incubator.vector.VECTOR_ACCESS_OOB_CHECK system property

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3
    • 22
    • 20.0.1, 21
    • core-libs
    •  

       

       

    • b02
    • Verified

    Backports

      Description

        A trivial use of the Vector API when run with the security manager and a domain that does not grant permissions fails as follows:

        java.lang.ExceptionInInitializerError
                at jdk.incubator.vector/jdk.incubator.vector.IntVector.fromArray(IntVector.java:2941)
                at VectorRuns.countRunAscendingVector(VectorRuns.java:80)
                at VectorRuns.main(VectorRuns.java:45)
                at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
                at java.base/java.lang.reflect.Method.invoke(Method.java:580)
                at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:125)
                at java.base/java.lang.Thread.run(Thread.java:1583)
        Caused by: java.security.AccessControlException: access denied ("java.util.PropertyPermission" "jdk.incubator.vector.VECTOR_ACCESS_OOB_CHECK" "read")
                at java.base/java.security.AccessControlContext.checkPermission(AccessControlContext.java:488)
                at java.base/java.security.AccessController.checkPermission(AccessController.java:1071)
                at java.base/java.lang.SecurityManager.checkPermission(SecurityManager.java:411)
                at java.base/java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:1146)
                at java.base/java.lang.System.getProperty(System.java:966)
                at java.base/java.lang.Integer.getInteger(Integer.java:1351)
                at java.base/java.lang.Integer.getInteger(Integer.java:1307)
                at jdk.incubator.vector/jdk.incubator.vector.VectorIntrinsics.<clinit>(VectorIntrinsics.java:34)
                ... 7 more

        Attachments

          Issue Links

            Activity

              People

                chegar Chris Hegarty
                chegar Chris Hegarty
                Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: