JDK-8274401 : C2: GraphKit::load_array_element bypasses Access API
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 17,18
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2021-09-27
  • Updated: 2021-10-18
  • Resolved: 2021-09-30
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 17 JDK 18
17.0.2Fixed 18 b18Fixed
Related Reports
Relates :  
Description
C2: GraphKit::load_array_element only creates nodes for loading a raw element from the given array. This is wrong when the element is an Oop which needs a load barrier for some GCs.

There's currently only one usage of load_array_element for an Oop element in code which is only used by PPC64 and s390. These platforms currently don't support GCs with load barriers. So, this issue needs to get fixed in order to support these GCs.

It will also need to get fixed for possible future usages with Oop elements.



Comments
Fix Request (17u): Prerequisite for backport of ZGC or ShenandoahGC on PPC64. Current implementation of GraphKit::load_array_element misses load barriers which are required for these GCs. It's a bug in C2 platform independent code, but currently only affects PPC64 and s390 which use this function for Oop array accesses. Note that future usages may require this fix on other platforms, too. Tested in jdk18. No regression. Applies cleanly.
15-10-2021

Changeset: a8210c53 Author: Martin Doerr <mdoerr@openjdk.org> Date: 2021-09-30 08:41:03 +0000 URL: https://git.openjdk.java.net/jdk/commit/a8210c53e7af1cb558251fcb420de1b8a5461b25
30-09-2021

ILW = Possible bypass of Access API in the future, not observed today, no workaround = MLH = P4
28-09-2021