JDK-8244282 : test/hotspot/jtreg/compiler/intrinsics/Test8237524.java fails with --illegal-access=deny
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 11,15
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2020-05-02
  • Updated: 2024-10-17
  • Resolved: 2020-06-11
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 15 JDK 16
11.0.10Fixed 15 b27Fixed 16Fixed
Related Reports
Relates :  
Description
This test fails when --illegal-access=deny (the default expected in a future release). It needs to be updated to add "@modules java.base/java.lang:open", otherwise it fails with:

java.lang.reflect.InaccessibleObjectException: Unable to make java.lang.String(byte[],byte) accessible: module java.base does not "opens java.lang" to unnamed module @551e5cb8
	at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:355)
	at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:295)
	at java.base/java.lang.reflect.Constructor.checkCanSetAccessible(Constructor.java:189)
	at java.base/java.lang.reflect.Constructor.setAccessible(Constructor.java:182)
	at compiler.intrinsics.Test8237524.main(Test8237524.java:45)



Comments
Fix Request (11u) This fixes the testbug and keeps codebases in sync (I see 11.0.11-oracle). Patch applies cleanly to 11u, affected test fails with "deny" without the patch, and passes with it.
23-11-2020

Changeset: 7e052132 Author: Evgeny Nikitin <enikitin@openjdk.org> Date: 2020-05-11 17:00:16 +0000 URL: https://git.openjdk.java.net/lanai/commit/7e052132
02-07-2020

URL: https://hg.openjdk.java.net/jdk/jdk/rev/e46529612c1e User: iignatyev Date: 2020-06-11 15:36:45 +0000
11-06-2020

ILW = Test fails (test bug), single test with --illegal-access=deny, no workaround = MLH = P4
04-05-2020