JDK-8224580 : Matcher can cause oop field/array element to be reloaded
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 8,11,13
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2019-05-22
  • Updated: 2020-05-07
  • Resolved: 2019-06-05
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 13 JDK 14 Other
11.0.5Fixed 13 b24Fixed 14Fixed openjdk8u232Fixed
Related Reports
Blocks :  
Description
With Shenandoah, we have a prototype where, rather than using an extra header field for the forwarding pointer, we use the mark word. When the shenandoah barrier is applied to an oop, the oop is first checked to be in cset which is done by converting the oop to an integer and extracting some of the bits of the address and then, if that test fails, the forwarding pointer is loaded by masking off some bits in the mark word. We're seeing a case where, in compiled code, the in cset test and the mark word load for the same oop use 2 different loads, i.e. the load of the field/array element is duplicated, it is reloaded between the in cset test and loading of the forwarding pointer.
Comments
The fix is not specific to Shenandoah. A later added test without Shenandoah fails in 11u without the fix but passes with it. I've therefore removed the label.
06-05-2020

Fix Request (8u) This fixes the C2 miscompilation that would manifest as the bug when JDK-8224584 is backported. Patch applies with reshuffling to 8u, passes tier1-like tests.
04-07-2019

Fix Request (11u) This fixes the C2 miscompilation that would manifest as the bug when JDK-8224584 is backported. Patch applies cleanly to 11u, passes tier1, tier2 tests.
25-06-2019

ILW = Same as JDK-8224584 which is blocked by this = P3
28-05-2019