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-03-06 08:29:33 +0000
committerglider@chromium.org <glider@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-06 08:29:33 +0000
commit4a4c8b9a917e9ebd91f53703dbbd091669751c9d (patch)
tree4dad44403748ef0cc7d77fdec873165786391858 /base/process_util_unittest.cc
parentfa8b723fa4b4ef4ba8367b5f7cefe6cb758234d9 (diff)
downloadchromium_src-4a4c8b9a917e9ebd91f53703dbbd091669751c9d.zip
chromium_src-4a4c8b9a917e9ebd91f53703dbbd091669751c9d.tar.gz
chromium_src-4a4c8b9a917e9ebd91f53703dbbd091669751c9d.tar.bz2
Fix ProcessUtilTest.MacTerminateOnHeapCorruption to pass under ASan on Mac.
BUG=114996 TBR=willchan Review URL: https://chromiumcodereview.appspot.com/9583012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@125135 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/process_util_unittest.cc')
-rw-r--r--base/process_util_unittest.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/base/process_util_unittest.cc b/base/process_util_unittest.cc
index 5a72f19..775f0ed 100644
--- a/base/process_util_unittest.cc
+++ b/base/process_util_unittest.cc
@@ -455,9 +455,16 @@ TEST_F(ProcessUtilTest, MacTerminateOnHeapCorruption) {
// will fail.
char buf[3];
+#ifndef 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");
+#else
+ // AddressSanitizer replaces malloc() and prints a different error message on
+ // heap corruption.
+ ASSERT_DEATH(free(buf), "attempting free on address which "
+ "was not malloc()-ed: .*");
+#endif
}
#endif // defined(OS_MACOSX)