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

Pointer access struct field failed with SecurityManager

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2
    • Resolution: Fixed
    • Affects Version/s: repo-panama
    • Fix Version/s: None
    • Component/s: core-libs
    • Labels:

      Description

      When SecurityManager is enabled, access a struct field throwing SecurityException like following,

      java.lang.IllegalStateException: java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "accessDeclaredMembers")
      at java.base/java.foreign.memory.Pointer.get(Pointer.java:166)
      at java.base/jdk.internal.foreign.ScopeImpl.allocateStruct(ScopeImpl.java:160)
      at PointerAccessTest.testGlobalScope(PointerAccessTest.java:71)

        Attachments

          Activity

            People

            Assignee:
            henryjen Henry Jen
            Reporter:
            henryjen Henry Jen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: