-
Bug
-
Resolution: Fixed
-
P3
-
15
-
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.
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.