JDK-8015385 : Remove RelaxAccessControlCheck for JDK 8 bytecodes
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: hs25
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • Submitted: 2013-05-24
  • Updated: 2014-09-26
  • Resolved: 2013-06-03
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 8 Other
8Fixed hs25Fixed
Related Reports
Relates :  
Description
Prevent avoidance of stricter access checks by removing the RelaxAccessControlCheck option for bytecode versions >=52.

This option was initially added in JDK 6 as part of the fix for bug 4293149.  Bug 4293149 requested stricter access checking in certain cases, when accessing another class or class's field, where both classes have the same protection domain and class loader.

The bug was fixed and the stricter access checking was made the default.  And, the RelaxAccessControlCheck option was added as a way for users to avoid the new stricter access checking.  This workaround was needed for old bytecodes (< 49) because they did not contain synthetic accessors needed to properly access private fields.

There were a lot of user complaints when the JDK was released with the stricter access checks because existing applications no longer worked.  Users wanted their applications to work without having to add the RelaxAccessControlCheck option.

Bug 6383849 was filed to fix the user complaints.  The fix for bug 6383849 made relaxed access checking the default for old class files (< 49), but the now redundant RelaxAccessControlCheck option was left in, allowing users with newer class file format versions to also avoid the stricter access checks.

RelaxAccessControlCheck needs to be removed in JDK 8 for bytecodes >= 52.  This would prevent future avoidance of the stricter access checks but not cause problems for applications that use RelaxAccessControlCheck with bytecodes older than 51.

I-Low  L-Med W-Yes