OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #ifndef RUNTIME_PLATFORM_ADDRESS_SANITIZER_H_ | 5 #ifndef RUNTIME_PLATFORM_ADDRESS_SANITIZER_H_ |
6 #define RUNTIME_PLATFORM_ADDRESS_SANITIZER_H_ | 6 #define RUNTIME_PLATFORM_ADDRESS_SANITIZER_H_ |
7 | 7 |
8 #include "platform/globals.h" | 8 #include "platform/globals.h" |
9 | 9 |
10 // Allow the use of ASan (AddressSanitizer). This is needed as ASan needs to be | 10 // Allow the use of ASan (AddressSanitizer). This is needed as ASan needs to be |
(...skipping 14 matching lines...) Expand all Loading... |
25 do { \ | 25 do { \ |
26 } while (false && (ptr) == 0 && (len) == 0) | 26 } while (false && (ptr) == 0 && (len) == 0) |
27 #define LSAN_REGISTER_ROOT_REGION(ptr, len) \ | 27 #define LSAN_REGISTER_ROOT_REGION(ptr, len) \ |
28 do { \ | 28 do { \ |
29 } while (false && (ptr) == 0 && (len) == 0) | 29 } while (false && (ptr) == 0 && (len) == 0) |
30 #define LSAN_UNREGISTER_ROOT_REGION(ptr, len) \ | 30 #define LSAN_UNREGISTER_ROOT_REGION(ptr, len) \ |
31 do { \ | 31 do { \ |
32 } while (false && (ptr) == 0 && (len) == 0) | 32 } while (false && (ptr) == 0 && (len) == 0) |
33 #endif // __has_feature(address_sanitizer) | 33 #endif // __has_feature(address_sanitizer) |
34 | 34 |
35 #else // defined(__has_feature) | 35 #else // defined(__has_feature) |
36 | 36 |
37 #define ASAN_UNPOISON(ptr, len) \ | 37 #define ASAN_UNPOISON(ptr, len) \ |
38 do { \ | 38 do { \ |
39 } while (false && (ptr) == 0 && (len) == 0) | 39 } while (false && (ptr) == 0 && (len) == 0) |
40 #define LSAN_REGISTER_ROOT_REGION(ptr, len) \ | 40 #define LSAN_REGISTER_ROOT_REGION(ptr, len) \ |
41 do { \ | 41 do { \ |
42 } while (false && (ptr) == 0 && (len) == 0) | 42 } while (false && (ptr) == 0 && (len) == 0) |
43 #define LSAN_UNREGISTER_ROOT_REGION(ptr, len) \ | 43 #define LSAN_UNREGISTER_ROOT_REGION(ptr, len) \ |
44 do { \ | 44 do { \ |
45 } while (false && (ptr) == 0 && (len) == 0) | 45 } while (false && (ptr) == 0 && (len) == 0) |
46 | 46 |
47 #endif // defined(__has_feature) | 47 #endif // defined(__has_feature) |
48 | 48 |
49 #endif // RUNTIME_PLATFORM_ADDRESS_SANITIZER_H_ | 49 #endif // RUNTIME_PLATFORM_ADDRESS_SANITIZER_H_ |
OLD | NEW |