SWDEV-466601 - Fix invalid mem acccess in kernarg readback path
Change-Id: I4654ae592adc8cf9c687136d45eb1b28d99c7ae1
[ROCm/clr commit: 055e05a12a]
This commit is contained in:
@@ -438,11 +438,11 @@ hipError_t GraphExec::CaptureAQLPackets() {
|
||||
} else if (kernArgImpl == KernelArgImpl::DeviceKernelArgsReadback &&
|
||||
kernarg_pool_size_graph_ != 0) {
|
||||
address dev_ptr = kernarg_pool_graph_ + kernarg_pool_size_graph_;
|
||||
auto kSentinel = *reinterpret_cast<volatile int*>(dev_ptr);
|
||||
auto kSentinel = *reinterpret_cast<volatile address>(dev_ptr - 1);
|
||||
_mm_sfence();
|
||||
*(dev_ptr - 1) = kSentinel;
|
||||
_mm_mfence();
|
||||
kSentinel = *reinterpret_cast<volatile int*>(dev_ptr - 1);
|
||||
kSentinel = *reinterpret_cast<volatile address>(dev_ptr - 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3246,7 +3246,7 @@ bool VirtualGPU::submitKernelInternal(const amd::NDRangeContainer& sizes,
|
||||
_mm_sfence();
|
||||
*(argBuffer + argSize - 1) = *(parameters + argSize - 1);
|
||||
_mm_mfence();
|
||||
auto kSentinel = *reinterpret_cast<volatile address*>(argBuffer + argSize - 1);
|
||||
auto kSentinel = *reinterpret_cast<volatile address>(argBuffer + argSize - 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user