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

Unified Diff: base/debug/asan_invalid_access.cc

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, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/debug/asan_invalid_access.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/debug/asan_invalid_access.cc
diff --git a/base/debug/asan_invalid_access.cc b/base/debug/asan_invalid_access.cc
index 040b937613b89af815d2557e814f8cfbb9772268..cee21066265c08282c90fc7fe95430f82422870b 100644
--- a/base/debug/asan_invalid_access.cc
+++ b/base/debug/asan_invalid_access.cc
@@ -16,7 +16,7 @@ namespace debug {
namespace {
-#if defined(SYZYASAN)
+#if defined(SYZYASAN) && defined(COMPILER_MSVC)
// Disable warning C4530: "C++ exception handler used, but unwind semantics are
// not enabled". We don't want to change the compilation flags just for this
// test, and no exception should be triggered here, so this warning has no value
@@ -46,7 +46,7 @@ NOINLINE void CorruptMemoryBlock(bool induce_crash) {
delete[] array;
}
#pragma warning(pop)
-#endif
+#endif // SYZYASAN && COMPILER_MSVC
} // namespace
@@ -91,7 +91,7 @@ void AsanHeapUseAfterFree() {
#endif // ADDRESS_SANITIZER || SYZYASAN
-#if defined(SYZYASAN)
+#if defined(SYZYASAN) && defined(COMPILER_MSVC)
void AsanCorruptHeapBlock() {
CorruptMemoryBlock(false);
}
@@ -99,7 +99,7 @@ void AsanCorruptHeapBlock() {
void AsanCorruptHeap() {
CorruptMemoryBlock(true);
}
-#endif // SYZYASAN
+#endif // SYZYASAN && COMPILER_MSVC
} // namespace debug
} // namespace base
« no previous file with comments | « base/debug/asan_invalid_access.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698