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

Unified Diff: base/process_util_unittest.cc

Issue 10012036: Do not run ProcessUtilTest.MacMallocFailureDoesNotTerminate under ASan. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 8 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/process_util_unittest.cc
===================================================================
--- base/process_util_unittest.cc (revision 131123)
+++ base/process_util_unittest.cc (working copy)
@@ -455,6 +455,9 @@
// test suite setup and does not need to be done again, else mach_override
// will fail.
+#if !defined(ADDRESS_SANITIZER)
+// The following code tests the system implementation of malloc() thus no need
+// to test it under AddressSanitizer.
TEST_F(ProcessUtilTest, MacMallocFailureDoesNotTerminate) {
// Install the OOM killer.
base::EnableTerminationOnOutOfMemory();
@@ -474,11 +477,12 @@
base::debug::Alias(buf);
}
+#endif // !defined(ADDRESS_SANITIZER)
TEST_F(ProcessUtilTest, MacTerminateOnHeapCorruption) {
// Assert that freeing an unallocated pointer will crash the process.
char buf[3];
-#ifndef ADDRESS_SANITIZER
+#if !defined(ADDRESS_SANITIZER)
ASSERT_DEATH(free(buf), "being freed.*"
"\\*\\*\\* set a breakpoint in malloc_error_break to debug.*"
"Terminating process due to a potential for future heap corruption");
@@ -487,7 +491,7 @@
// heap corruption.
ASSERT_DEATH(free(buf), "attempting free on address which "
"was not malloc\\(\\)-ed");
-#endif
+#endif // !defined(ADDRESS_SANITIZER)
}
#endif // defined(OS_MACOSX)
« 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