[aarch64-port-dev ] 8233839: aarch64: missing memory barrier in NewObjectArrayStub and NewTypeArrayStub
Yangfei (Felix)
felix.yang at huawei.com
Fri Nov 8 08:30:00 UTC 2019
Hi,
I witnessed random fail of one jcstress test on my 128-core aarch64 server: "org.openjdk.jcstress.tests.defaultValues.arrays.small.plain.StringTest"
Bug: https://bugs.openjdk.java.net/browse/JDK-8233839
I used the latest aarch64 jdk8u release build. Please refer to the bugzilla for details and the analysis.
I checked the assembler code emitted by LIR_Assembler::emit_alloc_array:
For the fast path, the StoreStore memory barrier is there. But it’s not the case for the slow path.
Patch adding the missing barrier for 14:
diff -r ad157fab6bf5 src/hotspot/cpu/aarch64/c1_Runtime1_aarch64.cpp
--- a/src/hotspot/cpu/aarch64/c1_Runtime1_aarch64.cpp Thu Nov 07 16:26:57 2019 -0800
+++ b/src/hotspot/cpu/aarch64/c1_Runtime1_aarch64.cpp Fri Nov 08 16:10:08 2019 +0800
@@ -840,6 +840,7 @@
__ sub(arr_size, arr_size, t1); // body length
__ add(t1, t1, obj); // body start
__ initialize_body(t1, arr_size, 0, t2);
+ __ membar(Assembler::StoreStore);
__ verify_oop(obj);
__ ret(lr);
JDK builds OK and passed tier1 test.
Thanks,
Felix
More information about the aarch64-port-dev
mailing list