Commit a936be57 authored by Anton Bikineev's avatar Anton Bikineev Committed by V8 LUCI CQ

cppgc: Fix NoSanitizeMemset

'volatile Address' is a volatile pointer to non-volatile memory, which
means that writes to dereferenced memory may still be omitted. The CL
fixes it by treating dereferenced memory as volatile.

Change-Id: Ide4949c317467cb4440f98a1114991a102577e00
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3118946Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
Commit-Queue: Anton Bikineev <bikineev@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76497}
parent 7daa04d8
......@@ -12,7 +12,7 @@ namespace cppgc {
namespace internal {
void NoSanitizeMemset(void* address, char c, size_t bytes) {
volatile Address base = reinterpret_cast<Address>(address);
volatile uint8_t* const base = static_cast<uint8_t*>(address);
for (size_t i = 0; i < bytes; ++i) {
base[i] = c;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment