| OLD | NEW |
| 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 #include <stddef.h> |
| 6 |
| 7 #include "base/debug/alias.h" |
| 8 #include "base/debug/asan_invalid_access.h" |
| 9 #include "base/logging.h" |
| 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "build/build_config.h" |
| 12 |
| 5 #if defined(OS_WIN) | 13 #if defined(OS_WIN) |
| 6 #include <windows.h> | 14 #include <windows.h> |
| 7 #endif | 15 #endif |
| 8 | 16 |
| 9 #include "base/debug/alias.h" | |
| 10 #include "base/debug/asan_invalid_access.h" | |
| 11 #include "base/logging.h" | |
| 12 #include "base/memory/scoped_ptr.h" | |
| 13 | |
| 14 namespace base { | 17 namespace base { |
| 15 namespace debug { | 18 namespace debug { |
| 16 | 19 |
| 17 namespace { | 20 namespace { |
| 18 | 21 |
| 19 #if defined(SYZYASAN) && defined(COMPILER_MSVC) | 22 #if defined(SYZYASAN) && defined(COMPILER_MSVC) |
| 20 // Disable warning C4530: "C++ exception handler used, but unwind semantics are | 23 // Disable warning C4530: "C++ exception handler used, but unwind semantics are |
| 21 // not enabled". We don't want to change the compilation flags just for this | 24 // not enabled". We don't want to change the compilation flags just for this |
| 22 // test, and no exception should be triggered here, so this warning has no value | 25 // test, and no exception should be triggered here, so this warning has no value |
| 23 // here. | 26 // here. |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 CorruptMemoryBlock(false); | 99 CorruptMemoryBlock(false); |
| 97 } | 100 } |
| 98 | 101 |
| 99 void AsanCorruptHeap() { | 102 void AsanCorruptHeap() { |
| 100 CorruptMemoryBlock(true); | 103 CorruptMemoryBlock(true); |
| 101 } | 104 } |
| 102 #endif // SYZYASAN && COMPILER_MSVC | 105 #endif // SYZYASAN && COMPILER_MSVC |
| 103 | 106 |
| 104 } // namespace debug | 107 } // namespace debug |
| 105 } // namespace base | 108 } // namespace base |
| OLD | NEW |