summaryrefslogtreecommitdiff
path: root/chromium/v8/src/heap/cppgc/memory.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/v8/src/heap/cppgc/memory.h')
-rw-r--r--chromium/v8/src/heap/cppgc/memory.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/chromium/v8/src/heap/cppgc/memory.h b/chromium/v8/src/heap/cppgc/memory.h
index adc2ce9bb38..3b9f6cb62c2 100644
--- a/chromium/v8/src/heap/cppgc/memory.h
+++ b/chromium/v8/src/heap/cppgc/memory.h
@@ -117,7 +117,11 @@ V8_INLINE void CheckMemoryIsInaccessible(const void* address, size_t size) {
static_assert(!CheckMemoryIsInaccessibleIsNoop(),
"CheckMemoryIsInaccessibleIsNoop() needs to reflect "
"CheckMemoryIsInaccessible().");
- ASAN_CHECK_MEMORY_REGION_IS_POISONED(address, size);
+ // Only check if memory is poisoned on 64 bit, since there we make sure that
+ // object sizes and alignments are multiple of shadow memory granularity.
+#if defined(V8_TARGET_ARCH_64_BIT)
+ ASAN_CHECK_WHOLE_MEMORY_REGION_IS_POISONED(address, size);
+#endif
ASAN_UNPOISON_MEMORY_REGION(address, size);
CheckMemoryIsZero(address, size);
ASAN_POISON_MEMORY_REGION(address, size);