JDK-8214583 : AccessController.getContext may return wrong value after JDK-8212605
  • Type: Bug
  • Component: security-libs
  • Sub-Component: java.security
  • Affected Version: 12
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2018-12-01
  • Updated: 2024-04-15
  • Resolved: 2018-12-19
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 12 JDK 13
11.0.21.0.0.1-oracleFixed 12 b25Fixed 13Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Description
The attached test demonstrates the problem.
Comments
The immediate cause is that C2 and Graal can eliminate allocations if it can be determined that they do not "escape". However, getContext relies on there being a concrete context object to retrieve. C2 workaround: -XX:-EliminateAllocations Graal workaround: -Dgraal.PartialEscapeAnalysis=false
01-02-2022

URL: http://hg.openjdk.java.net/jdk/jdk12/rev/7496df94b3b7 User: dlong Date: 2018-12-19 01:20:50 +0000
19-12-2018