#include "zone.h"
-#ifdef ADDRESS_SANITIZER
+#ifdef V8_USE_ADDRESS_SANITIZER
#include <sanitizer/asan_interface.h>
#else
#define ASAN_UNPOISON_MEMORY_REGION(start, size) ((void) 0)
Address result = position_;
int size_with_redzone =
-#ifdef ADDRESS_SANITIZER
+#ifdef V8_USE_ADDRESS_SANITIZER
size + kASanRedzoneBytes;
#else
size;
position_ += size_with_redzone;
}
-#ifdef ADDRESS_SANITIZER
+#ifdef V8_USE_ADDRESS_SANITIZER
Address redzone_position = result + size;
ASSERT(redzone_position + kASanRedzoneBytes == position_);
ASAN_POISON_MEMORY_REGION(redzone_position, kASanRedzoneBytes);
namespace v8 {
namespace internal {
+#if defined(__has_feature)
+ #if __has_feature(address_sanitizer)
+ #define V8_USE_ADDRESS_SANITIZER
+ #endif
+#endif
class Segment;
class Isolate;
// All pointers returned from New() have this alignment. In addition, if the
// object being allocated has a size that is divisible by 8 then its alignment
// will be 8. ASan requires 8-byte alignment.
-#ifdef ADDRESS_SANITIZER
+#ifdef V8_USE_ADDRESS_SANITIZER
static const int kAlignment = 8;
STATIC_ASSERT(kPointerSize <= 8);
#else