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

compiler/graalunit tests fails with --illegal-access=deny

XMLWordPrintable

    • b17

      In preparation for fully encapsulating the standard and JDK modules, we need all tests to pass with --illegal-access=deny. To that end, the following hotspot jtreg tests need to be examined:

      compiler/graalunit/CoreTest.java
      compiler/graalunit/HotspotJdk9Test.java
      compiler/graalunit/ReplacementsTest.java

      These tests attempt to bypass access control with setAccessible(true) to get at non-public members, e.g. compiler/graalunit/ReplacementsTest.java fails with:

      testStringLatin1Inflate(org.graalvm.compiler.replacements.test.StringCompressInflateTest)
      java.lang.reflect.InaccessibleObjectException: Unable to make public static void java.lang.StringLatin1.inflate(byte[],int,char[],int,int) accessible: module java.base does not "opens java.lang" to unnamed module @240139e1

      Similar issues have been fixed in other tests with the jtreg @modules tag and using the +open modifier to open the package to the test. Tests can also be run with the --add-opens CLI option.

            epavlova Ekaterina Pavlova
            alanb Alan Bateman
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: