-
Bug
-
Resolution: Fixed
-
P4
-
8-aarch64, 11, 13
-
b07
-
aarch64
-
generic
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8248561 | 11.0.9-oracle | Fei Yang | P4 | Resolved | Fixed | b01 |
JDK-8226663 | 11.0.5 | Fei Yang | P4 | Resolved | Fixed | b01 |
JDK-8260832 | openjdk8u292 | Andrew Hughes | P4 | Resolved | Fixed | b01 |
Reported by lunliu93@gmail.com :
I noticed in the template interpreter only a StoreStore barrier is used
before a volatile write. According to JMM cookbook I think a LoadStore
barrier is also needed to prevent reordering between a normal read and a
volatile write. In the template interpreter it seems like LoadLoad |
LoadStore barriers are inserted after both normal read and volatile read so
it should be fine but I think this might cause a problem if the compiler
generates a normal read using dmb barriers and the interpreter is executing
the volatile write. Could this be a potential bug?
I am browsing aarch64-port/jdk8u code with the following changeset as the
lastest change
changeset: 9947:1d411780111d
tag: tip
user: fyang
date: Mon Dec 24 13:42:31 2018 +0800
summary: 8209414: AArch64: method handle invocation does not respect
JVMTI interp_only mode
This could be fixed by a simple patch below
diff -r 1d411780111d src/cpu/aarch64/vm/templateTable_aarch64.cpp
--- a/src/cpu/aarch64/vm/templateTable_aarch64.cpp Mon Dec 24 13:42:31
2018 +0800
+++ b/src/cpu/aarch64/vm/templateTable_aarch64.cpp Wed Jan 30 21:34:47
2019 +0100
@@ -2633,7 +2633,7 @@
{
Label notVolatile;
__ tbz(r5, ConstantPoolCacheEntry::is_volatile_shift, notVolatile);
- __ membar(MacroAssembler::StoreStore);
+ __ membar(MacroAssembler::StoreStore | LoadStore);
__ bind(notVolatile);
}
I noticed in the template interpreter only a StoreStore barrier is used
before a volatile write. According to JMM cookbook I think a LoadStore
barrier is also needed to prevent reordering between a normal read and a
volatile write. In the template interpreter it seems like LoadLoad |
LoadStore barriers are inserted after both normal read and volatile read so
it should be fine but I think this might cause a problem if the compiler
generates a normal read using dmb barriers and the interpreter is executing
the volatile write. Could this be a potential bug?
I am browsing aarch64-port/jdk8u code with the following changeset as the
lastest change
changeset: 9947:1d411780111d
tag: tip
user: fyang
date: Mon Dec 24 13:42:31 2018 +0800
summary: 8209414: AArch64: method handle invocation does not respect
JVMTI interp_only mode
This could be fixed by a simple patch below
diff -r 1d411780111d src/cpu/aarch64/vm/templateTable_aarch64.cpp
--- a/src/cpu/aarch64/vm/templateTable_aarch64.cpp Mon Dec 24 13:42:31
2018 +0800
+++ b/src/cpu/aarch64/vm/templateTable_aarch64.cpp Wed Jan 30 21:34:47
2019 +0100
@@ -2633,7 +2633,7 @@
{
Label notVolatile;
__ tbz(r5, ConstantPoolCacheEntry::is_volatile_shift, notVolatile);
- __ membar(MacroAssembler::StoreStore);
+ __ membar(MacroAssembler::StoreStore | LoadStore);
__ bind(notVolatile);
}
- backported by
-
JDK-8226663 aarch64: missing LoadStore barrier in TemplateTable::putfield_or_static
- Resolved
-
JDK-8248561 aarch64: missing LoadStore barrier in TemplateTable::putfield_or_static
- Resolved
-
JDK-8260832 aarch64: missing LoadStore barrier in TemplateTable::putfield_or_static
- Resolved
- relates to
-
JDK-8221220 AArch64: Add StoreStore membar explicitly for Volatile Writes in TemplateTable
- Resolved
-
JDK-8257192 Integrate AArch64 JIT port into 8u
- Resolved