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

Side by Side Diff: base/debug/asan_invalid_access.h

Issue 433493002: Hide some SyzyASan specific code behind an '#if defined(COMPILER_MSVC)'. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix nit Created 6 years, 4 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 | base/debug/asan_invalid_access.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 // Defines some functions that intentionally do an invalid memory access in 5 // Defines some functions that intentionally do an invalid memory access in
6 // order to trigger an AddressSanitizer (ASan) error report. 6 // order to trigger an AddressSanitizer (ASan) error report.
7 7
8 #ifndef BASE_DEBUG_ASAN_INVALID_ACCESS_H_ 8 #ifndef BASE_DEBUG_ASAN_INVALID_ACCESS_H_
9 #define BASE_DEBUG_ASAN_INVALID_ACCESS_H_ 9 #define BASE_DEBUG_ASAN_INVALID_ACCESS_H_
10 10
(...skipping 11 matching lines...) Expand all
22 // Generates an heap buffer underflow. 22 // Generates an heap buffer underflow.
23 BASE_EXPORT NOINLINE void AsanHeapUnderflow(); 23 BASE_EXPORT NOINLINE void AsanHeapUnderflow();
24 24
25 // Generates an use after free. 25 // Generates an use after free.
26 BASE_EXPORT NOINLINE void AsanHeapUseAfterFree(); 26 BASE_EXPORT NOINLINE void AsanHeapUseAfterFree();
27 27
28 #endif // ADDRESS_SANITIZER || SYZYASAN 28 #endif // ADDRESS_SANITIZER || SYZYASAN
29 29
30 // The "corrupt-block" and "corrupt-heap" classes of bugs is specific to 30 // The "corrupt-block" and "corrupt-heap" classes of bugs is specific to
31 // SyzyASan. 31 // SyzyASan.
32 #if defined(SYZYASAN) 32 #if defined(SYZYASAN) && defined(COMPILER_MSVC)
33 33
34 // Corrupts a memory block and makes sure that the corruption gets detected when 34 // Corrupts a memory block and makes sure that the corruption gets detected when
35 // we try to free this block. 35 // we try to free this block.
36 BASE_EXPORT NOINLINE void AsanCorruptHeapBlock(); 36 BASE_EXPORT NOINLINE void AsanCorruptHeapBlock();
37 37
38 // Corrupts the heap and makes sure that the corruption gets detected when a 38 // Corrupts the heap and makes sure that the corruption gets detected when a
39 // crash occur. 39 // crash occur.
40 BASE_EXPORT NOINLINE void AsanCorruptHeap(); 40 BASE_EXPORT NOINLINE void AsanCorruptHeap();
41 41
42 #endif // SYZYASAN 42 #endif // SYZYASAN && COMPILER_MSVC
43 43
44 } // namespace debug 44 } // namespace debug
45 } // namespace base 45 } // namespace base
46 46
47 #endif // BASE_DEBUG_ASAN_INVALID_ACCESS_H_ 47 #endif // BASE_DEBUG_ASAN_INVALID_ACCESS_H_
OLDNEW
« no previous file with comments | « no previous file | base/debug/asan_invalid_access.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698