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/+/3118946 Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Commit-Queue: Anton Bikineev <bikineev@chromium.org> Cr-Commit-Position: refs/heads/main@{#76497}
This commit is contained in:
parent
7daa04d879
commit
a936be5721
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user