Index: Source/platform/heap/AddressSanitizer.h |
diff --git a/Source/platform/heap/AddressSanitizer.h b/Source/platform/heap/AddressSanitizer.h |
index 2104217426f27bec0a2d67de870fcff81bc476b6..2908ea7aa2f171587e86843736bb39cc7b9e51ef 100644 |
--- a/Source/platform/heap/AddressSanitizer.h |
+++ b/Source/platform/heap/AddressSanitizer.h |
@@ -35,32 +35,8 @@ |
// Windows). |
// FIXME: Add Windows support here. |
#if defined(ADDRESS_SANITIZER) && !OS(WIN) |
-extern "C" { |
- // Marks memory region [addr, addr+size) as unaddressable. |
- // This memory must be previously allocated by the user program. Accessing |
- // addresses in this region from instrumented code is forbidden until |
- // this region is unpoisoned. This function is not guaranteed to poison |
- // the whole region - it may poison only subregion of [addr, addr+size) due |
- // to ASan alignment restrictions. |
- // Method is NOT thread-safe in the sense that no two threads can |
- // (un)poison memory in the same memory region simultaneously. |
- void __asan_poison_memory_region(void const volatile*, size_t); |
- // Marks memory region [addr, addr+size) as addressable. |
- // This memory must be previously allocated by the user program. Accessing |
- // addresses in this region is allowed until this region is poisoned again. |
- // This function may unpoison a superregion of [addr, addr+size) due to |
- // ASan alignment restrictions. |
- // Method is NOT thread-safe in the sense that no two threads can |
- // (un)poison memory in the same memory region simultaneously. |
- void __asan_unpoison_memory_region(void const volatile*, size_t); |
- |
- // User code should use macros instead of functions. |
-#define ASAN_POISON_MEMORY_REGION(addr, size) \ |
- __asan_poison_memory_region((addr), (size)) |
-#define ASAN_UNPOISON_MEMORY_REGION(addr, size) \ |
- __asan_unpoison_memory_region((addr), (size)) |
+#include <sanitizer/asan_interface.h> |
#define NO_SANITIZE_ADDRESS __attribute__((no_sanitize_address)) |
-} |
#else |
#define ASAN_POISON_MEMORY_REGION(addr, size) \ |
((void)(addr), (void)(size)) |