Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(440)

Side by Side Diff: third_party/WebKit/Source/wtf/AddressSanitizer.h

Issue 2387903002: clang/win: Remove FIXME now that we don't need /fallback any more. (Closed)
Patch Set: rebase once more Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "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 #else 16 #else
16 #define ASAN_POISON_MEMORY_REGION(addr, size) ((void)(addr), (void)(size)) 17 #define ASAN_POISON_MEMORY_REGION(addr, size) ((void)(addr), (void)(size))
17 #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
18 #endif 20 #endif
19 21
20 #if defined(LEAK_SANITIZER) 22 #if defined(LEAK_SANITIZER)
21 #include <sanitizer/lsan_interface.h> 23 #include <sanitizer/lsan_interface.h>
22 #else 24 #else
23 #define __lsan_register_root_region(addr, size) ((void)(addr), (void)(size)) 25 #define __lsan_register_root_region(addr, size) ((void)(addr), (void)(size))
24 #define __lsan_unregister_root_region(addr, size) ((void)(addr), (void)(size)) 26 #define __lsan_unregister_root_region(addr, size) ((void)(addr), (void)(size))
25 #endif 27 #endif
26 28
27 #if defined(MEMORY_SANITIZER) 29 #if defined(MEMORY_SANITIZER)
28 #include <sanitizer/msan_interface.h> 30 #include <sanitizer/msan_interface.h>
29 #endif
30
31 // TODO(sof): Have to handle (ADDRESS_SANITIZER && _WIN32) differently as it
32 // uses both Clang (which supports the __attribute__ syntax) and CL (which
33 // doesn't) as long as we use "clang-cl /fallback". This shouldn't be needed
34 // when Clang handles all the code without falling back to CL.
35 #if defined(ADDRESS_SANITIZER) && (!OS(WIN) || COMPILER(CLANG))
36 #define NO_SANITIZE_ADDRESS __attribute__((no_sanitize_address))
37 #else
38 #define NO_SANITIZE_ADDRESS
39 #endif
40
41 #if defined(MEMORY_SANITIZER) && (!OS(WIN) || COMPILER(CLANG))
42 #define NO_SANITIZE_MEMORY __attribute__((no_sanitize_memory)) 31 #define NO_SANITIZE_MEMORY __attribute__((no_sanitize_memory))
43 #else 32 #else
44 #define NO_SANITIZE_MEMORY 33 #define NO_SANITIZE_MEMORY
45 #endif 34 #endif
46 35
47 #if defined(THREAD_SANITIZER) && (!OS(WIN) || COMPILER(CLANG)) 36 #if defined(THREAD_SANITIZER)
48 #define NO_SANITIZE_THREAD __attribute__((no_sanitize_thread)) 37 #define NO_SANITIZE_THREAD __attribute__((no_sanitize_thread))
49 #else 38 #else
50 #define NO_SANITIZE_THREAD 39 #define NO_SANITIZE_THREAD
51 #endif 40 #endif
52 41
53 #endif // WTF_AddressSanitizer_h 42 #endif // WTF_AddressSanitizer_h
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698