Move DISABLE_ASAN macro to base/sanitizer/asan.h

Bug: chromium:1056170
Change-Id: I09c6764c62cb459f3cfe317508bbc663debb66b7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2919961
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74813}
This commit is contained in:
Clemens Backes 2021-05-27 10:53:25 +02:00 committed by V8 LUCI CQ
parent 22135c13b5
commit 2542ce2562
4 changed files with 5 additions and 8 deletions

View File

@ -155,13 +155,6 @@ V8_INLINE Dest bit_cast(Source const& source) {
#endif
#endif
// Define DISABLE_ASAN macro.
#ifdef V8_USE_ADDRESS_SANITIZER
#define DISABLE_ASAN __attribute__((no_sanitize_address))
#else
#define DISABLE_ASAN
#endif
// Define V8_USE_MEMORY_SANITIZER macro.
#if defined(__has_feature)
#if __has_feature(memory_sanitizer)

View File

@ -20,8 +20,12 @@
"ASAN_POISON_MEMORY_REGION and ASAN_UNPOISON_MEMORY_REGION must be defined"
#endif
#define DISABLE_ASAN __attribute__((no_sanitize_address))
#else // !V8_USE_ADDRESS_SANITIZER
#define DISABLE_ASAN
#define ASAN_POISON_MEMORY_REGION(start, size) \
static_assert(std::is_pointer<decltype(start)>::value, \
"static type violation"); \

View File

@ -6,7 +6,6 @@
#include <limits>
#include "src/base/macros.h"
#include "src/base/platform/platform.h"
#include "src/base/sanitizer/asan.h"
#include "src/base/sanitizer/msan.h"

View File

@ -5,6 +5,7 @@
#include <stdint.h>
#include "src/base/build_config.h"
#include "src/base/sanitizer/asan.h"
#include "test/cctest/cctest.h"
namespace v8 {