summaryrefslogtreecommitdiffstats
path: root/base/process_util_unittest.cc
diff options
context:
space:
mode:
authorglider@chromium.org <glider@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-06 14:32:00 +0000
committerglider@chromium.org <glider@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-06 14:32:00 +0000
commite6f1aa44c93f4157459d3ddd55382c4ce533e4c7 (patch)
tree9adff1653006cb65debd22eef575bfc9cfd1e76b /base/process_util_unittest.cc
parent16936348906a1c7d1b94611796431b1e76cd5aed (diff)
downloadchromium_src-e6f1aa44c93f4157459d3ddd55382c4ce533e4c7.zip
chromium_src-e6f1aa44c93f4157459d3ddd55382c4ce533e4c7.tar.gz
chromium_src-e6f1aa44c93f4157459d3ddd55382c4ce533e4c7.tar.bz2
Do not run ProcessUtilTest.MacMallocFailureDoesNotTerminate under ASan.
BUG=122140 TBR=willchan Review URL: https://chromiumcodereview.appspot.com/10012036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@131124 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/process_util_unittest.cc')
-rw-r--r--base/process_util_unittest.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/base/process_util_unittest.cc b/base/process_util_unittest.cc
index b74a3fb..45ecdbb 100644
--- a/base/process_util_unittest.cc
+++ b/base/process_util_unittest.cc
@@ -455,6 +455,9 @@ TEST_F(ProcessUtilTest, LaunchAsUser) {
// 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 @@ TEST_F(ProcessUtilTest, MacMallocFailureDoesNotTerminate) {
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 @@ TEST_F(ProcessUtilTest, MacTerminateOnHeapCorruption) {
// heap corruption.
ASSERT_DEATH(free(buf), "attempting free on address which "
"was not malloc\\(\\)-ed");
-#endif
+#endif // !defined(ADDRESS_SANITIZER)
}
#endif // defined(OS_MACOSX)