summaryrefslogtreecommitdiffstats
path: root/base/tools_sanity_unittest.cc
diff options
context:
space:
mode:
authormithro@mithis.com <mithro@mithis.com@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-09 01:38:21 +0000
committermithro@mithis.com <mithro@mithis.com@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-09 01:38:21 +0000
commitba145404571ba9dd186e5a195d76b869779fb624 (patch)
tree405eb940f2d44f702e9c25bee89bfc9d5840952d /base/tools_sanity_unittest.cc
parentf93c454cab8119d13c5bc16e9801bd9ca2acd93a (diff)
downloadchromium_src-ba145404571ba9dd186e5a195d76b869779fb624.zip
chromium_src-ba145404571ba9dd186e5a195d76b869779fb624.tar.gz
chromium_src-ba145404571ba9dd186e5a195d76b869779fb624.tar.bz2
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
Diffstat (limited to 'base/tools_sanity_unittest.cc')
-rw-r--r--base/tools_sanity_unittest.cc20
1 files changed, 16 insertions, 4 deletions
diff --git a/base/tools_sanity_unittest.cc b/base/tools_sanity_unittest.cc
index ff78938..488baba 100644
--- a/base/tools_sanity_unittest.cc
+++ b/base/tools_sanity_unittest.cc
@@ -65,14 +65,26 @@ void WriteValueOutOfArrayBoundsRight(char *ptr, size_t size) {
void MakeSomeErrors(char *ptr, size_t size) {
ReadUninitializedValue(ptr);
+
+ HARMFUL_ACCESS(ReadValueOutOfArrayBoundsLeft(ptr),
+ "heap-buffer-overflow");
HARMFUL_ACCESS(ReadValueOutOfArrayBoundsLeft(ptr),
- "heap-buffer-overflow.*2 bytes to the left");
+ "2 bytes to the left");
+
+ HARMFUL_ACCESS(ReadValueOutOfArrayBoundsRight(ptr, size),
+ "heap-buffer-overflow");
HARMFUL_ACCESS(ReadValueOutOfArrayBoundsRight(ptr, size),
- "heap-buffer-overflow.*1 bytes to the right");
+ "1 bytes to the right");
+
+ HARMFUL_ACCESS(WriteValueOutOfArrayBoundsLeft(ptr),
+ "heap-buffer-overflow");
HARMFUL_ACCESS(WriteValueOutOfArrayBoundsLeft(ptr),
- "heap-buffer-overflow.*1 bytes to the left");
+ "1 bytes to the left");
+
+ HARMFUL_ACCESS(WriteValueOutOfArrayBoundsRight(ptr, size),
+ "heap-buffer-overflow");
HARMFUL_ACCESS(WriteValueOutOfArrayBoundsRight(ptr, size),
- "heap-buffer-overflow.*0 bytes to the right");
+ "0 bytes to the right");
}
} // namespace