From ba145404571ba9dd186e5a195d76b869779fb624 Mon Sep 17 00:00:00 2001 From: "mithro@mithis.com" Date: Mon, 9 Dec 2013 01:38:21 +0000 Subject: Make gtest always use simple internal regex engine. In order to allow regex matches in gtest to be shared between Windows and other systems, we tell gtest to always use it's internal engine. The syntax supported by the internal engine initially looks like a subset of POSIX regexs. However character class shortcuts are not valid POSIX. Even more confusingly the system POSIX regex function often defines extra features not actually part of the standard allowing regex that work on Linux fail on Mac OS X. A search through the code base did not reveal any locations where features not supported by the internal regex engine where used. See bug https://code.google.com/p/chromium/issues/detail?id=317224 for more detailed description. BUG=317224 Review URL: https://codereview.chromium.org/55983002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@239423 0039d316-1c4b-4281-b951-d872f2087c98 --- base/process/memory_unittest.cc | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'base/process/memory_unittest.cc') diff --git a/base/process/memory_unittest.cc b/base/process/memory_unittest.cc index e5c759d..33fcc85 100644 --- a/base/process/memory_unittest.cc +++ b/base/process/memory_unittest.cc @@ -121,9 +121,7 @@ TEST(ProcessMemoryTest, MacMallocFailureDoesNotTerminate) { buf = malloc(std::numeric_limits::max() - (2 * PAGE_SIZE) - 1); }, testing::KilledBySignal(SIGTRAP), - "\\*\\*\\* error: can't allocate region.*" - "(Terminating process due to a potential for future heap " - "corruption){0}"); + "\\*\\*\\* error: can't allocate region.*\\n?.*"); base::debug::Alias(buf); } @@ -143,8 +141,8 @@ TEST(ProcessMemoryTest, MacTerminateOnHeapCorruption) { ASSERT_DEATH(free(buf), "attempting free on address which " "was not malloc\\(\\)-ed"); #else - ASSERT_DEATH(free(buf), "being freed.*" - "\\*\\*\\* set a breakpoint in malloc_error_break to debug.*" + ASSERT_DEATH(free(buf), "being freed.*\\n?\\.*" + "\\*\\*\\* set a breakpoint in malloc_error_break to debug.*\\n?.*" "Terminating process due to a potential for future heap corruption"); #endif // ARCH_CPU_64_BITS || defined(ADDRESS_SANITIZER) } -- cgit v1.1