JDK-8370137 : C2: Ensure dependent memory accesses can't float past ReachabilityFence
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 26
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2025-10-17
  • Updated: 2025-10-17
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.
Other
tbdUnresolved
Related Reports
Relates :  
Description
If a memory access (either load or store) dependent on a referent of a ReachabilityFence node floats past the corresponding ReachabilityFence node, it may break a ReachabilityFence guarantee if it then floats past a safepoint (those aren't classified as interfering by JDK-8290892).

If ReachabilityFence is represented as a memory barrier, it would guarantee such scheduling is impossible, but MemBar IR representation is prohibitively expensive (from performance POV). 

One way to address it is to make interfering safepoint enumeration algorithm in  JDK-8290892 more conservative and consider any safepoints reachable from referent control as interfering.