JDK-8219635 : aarch64: missing LoadStore barrier in TemplateTable::fast_storefield
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 8-aarch64,11,13
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: aarch64
  • Submitted: 2019-02-25
  • Updated: 2021-02-01
  • Resolved: 2019-02-26
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 Other
11.0.5Fixed 13 b10Fixed openjdk8u292Fixed
Related Reports
Relates :  
Relates :  
Description
Reported by: patrick@os.amperecomputing.com

https://mail.openjdk.java.net/pipermail/aarch64-port-dev/2019-February/006942.html 
===================
Perhaps TemplateTable::fast_storefield needs the additional " | MacroAssembler::LoadStore" as well, please double check, thanks.
http://hg.openjdk.java.net/jdk/jdk/file/f41793b5b83f/src/hotspot/cpu/aarch64/templateTable_aarch64.cpp#l2984
===================

Proposed fix: https://mail.openjdk.java.net/pipermail/aarch64-port-dev/2019-February/006947.html 

diff -r 2a78b2963793 src/hotspot/cpu/aarch64/templateTable_aarch64.cpp
--- a/src/hotspot/cpu/aarch64/templateTable_aarch64.cpp Wed Feb 13 13:27:17 2019 +0100
+++ b/src/hotspot/cpu/aarch64/templateTable_aarch64.cpp Fri Feb 22 17:18:20 2019 +0800
@@ -2981,7 +2981,7 @@
   {
     Label notVolatile;
     __ tbz(r3, ConstantPoolCacheEntry::is_volatile_shift, notVolatile);
-    __ membar(MacroAssembler::StoreStore);
+    __ membar(MacroAssembler::StoreStore | MacroAssembler::LoadStore);
     __ bind(notVolatile);
   }
Comments
Fix Request (11u) This patch is already in 13 and 8u-aarch64, but not in 11u. Backporting it to 11u keeps codebases in sync, which simplifies future backports. Patch applies cleanly to 11u, passes tier1 (with some unrelated failures).
20-06-2019