| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef WTF_AddressSanitizer_h | 5 #ifndef WTF_AddressSanitizer_h |
| 6 #define WTF_AddressSanitizer_h | 6 #define WTF_AddressSanitizer_h |
| 7 // TODO(kojii): This file will need to be renamed, because it's no more | 7 // TODO(kojii): This file will need to be renamed, because it's no more |
| 8 // specific to AddressSanitizer. | 8 // specific to AddressSanitizer. |
| 9 | 9 |
| 10 #include "wtf/build_config.h" | 10 #include "platform/wtf/build_config.h" |
| 11 | 11 |
| 12 // TODO(sof): Add SyZyASan support? | 12 // TODO(sof): Add SyZyASan support? |
| 13 #if defined(ADDRESS_SANITIZER) | 13 #if defined(ADDRESS_SANITIZER) |
| 14 #include <sanitizer/asan_interface.h> | 14 #include <sanitizer/asan_interface.h> |
| 15 #define NO_SANITIZE_ADDRESS __attribute__((no_sanitize_address)) | 15 #define NO_SANITIZE_ADDRESS __attribute__((no_sanitize_address)) |
| 16 #else | 16 #else |
| 17 #define ASAN_POISON_MEMORY_REGION(addr, size) ((void)(addr), (void)(size)) | 17 #define ASAN_POISON_MEMORY_REGION(addr, size) ((void)(addr), (void)(size)) |
| 18 #define ASAN_UNPOISON_MEMORY_REGION(addr, size) ((void)(addr), (void)(size)) | 18 #define ASAN_UNPOISON_MEMORY_REGION(addr, size) ((void)(addr), (void)(size)) |
| 19 #define NO_SANITIZE_ADDRESS | 19 #define NO_SANITIZE_ADDRESS |
| 20 #endif | 20 #endif |
| (...skipping 12 matching lines...) Expand all Loading... |
| 33 #define NO_SANITIZE_MEMORY | 33 #define NO_SANITIZE_MEMORY |
| 34 #endif | 34 #endif |
| 35 | 35 |
| 36 #if defined(THREAD_SANITIZER) | 36 #if defined(THREAD_SANITIZER) |
| 37 #define NO_SANITIZE_THREAD __attribute__((no_sanitize_thread)) | 37 #define NO_SANITIZE_THREAD __attribute__((no_sanitize_thread)) |
| 38 #else | 38 #else |
| 39 #define NO_SANITIZE_THREAD | 39 #define NO_SANITIZE_THREAD |
| 40 #endif | 40 #endif |
| 41 | 41 |
| 42 #endif // WTF_AddressSanitizer_h | 42 #endif // WTF_AddressSanitizer_h |
| OLD | NEW |