8265699: (bf) Scopes passed to ScopedMemoryAccess.copy[Swap]Memory in incorrect order

Reviewed-by: mcimadamore
This commit is contained in:
Brian Burkhalter 2021-04-22 19:44:01 +00:00
parent b930bb1a2c
commit ca0de266b4
2 changed files with 7 additions and 6 deletions

View File

@ -481,7 +481,7 @@ class Direct$Type$Buffer$RW$$BO$
try {
#if[!byte]
if (order() != ByteOrder.nativeOrder())
SCOPED_MEMORY_ACCESS.copySwapMemory(scope(), null, src,
SCOPED_MEMORY_ACCESS.copySwapMemory(null, scope(), src,
srcOffset,
null,
ix(pos),
@ -489,7 +489,7 @@ class Direct$Type$Buffer$RW$$BO$
(long)1 << $LG_BYTES_PER_VALUE$);
else
#end[!byte]
SCOPED_MEMORY_ACCESS.copyMemory(scope(), null, src,
SCOPED_MEMORY_ACCESS.copyMemory(null, scope(), src,
srcOffset,
null,
ix(pos),
@ -518,7 +518,7 @@ class Direct$Type$Buffer$RW$$BO$
try {
#if[!byte]
if (order() != ByteOrder.nativeOrder())
SCOPED_MEMORY_ACCESS.copySwapMemory(scope(), null, src,
SCOPED_MEMORY_ACCESS.copySwapMemory(null, scope(), src,
srcOffset,
null,
ix(index),
@ -527,7 +527,7 @@ class Direct$Type$Buffer$RW$$BO$
else
#end[!byte]
SCOPED_MEMORY_ACCESS.copyMemory(
scope(), null, src,
null, scope(), src,
srcOffset, null, ix(index), (long)length << $LG_BYTES_PER_VALUE$);
} finally {
Reference.reachabilityFence(this);
@ -548,6 +548,7 @@ class Direct$Type$Buffer$RW$$BO$
assert (pos <= lim);
int rem = (pos <= lim ? lim - pos : 0);
try {
// null is passed as destination Scope to avoid checking scope() twice
SCOPED_MEMORY_ACCESS.copyMemory(scope(), null, null,
ix(pos), null, ix(0), (long)rem << $LG_BYTES_PER_VALUE$);
} finally {

View File

@ -1058,7 +1058,7 @@ public abstract class $Type$Buffer
#end[!byte]
try {
SCOPED_MEMORY_ACCESS.copyMemory(
scope(), src.scope(), srcBase,
src.scope(), scope(), srcBase,
srcAddr, base, addr, len);
} finally {
Reference.reachabilityFence(src);
@ -1068,7 +1068,7 @@ public abstract class $Type$Buffer
} else {
try {
SCOPED_MEMORY_ACCESS.copySwapMemory(
scope(), src.scope(), srcBase,
src.scope(), scope(), srcBase,
srcAddr, base, addr, len, (long)1 << $LG_BYTES_PER_VALUE$);
} finally {
Reference.reachabilityFence(src);