[compiler-rt] r367874 - Try to fix OOB tests more on Windows after r367642
Nico Weber via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 5 08:10:15 PDT 2019
Author: nico
Date: Mon Aug 5 08:10:15 2019
New Revision: 367874
URL: http://llvm.org/viewvc/llvm-project?rev=367874&view=rev
Log:
Try to fix OOB tests more on Windows after r367642
See PR42868 for more details.
The affected list of tests is:
Failing Tests (8):
AddressSanitizer-Unit :: ./Asan-x86_64-calls-Test.exe/AddressSanitizer.LargeOOBRightTest
AddressSanitizer-Unit :: ./Asan-x86_64-calls-Test.exe/AddressSanitizer.OOBRightTest
AddressSanitizer-Unit :: ./Asan-x86_64-calls-Test.exe/AddressSanitizer.OOB_char
AddressSanitizer-Unit :: ./Asan-x86_64-calls-Test.exe/AddressSanitizer.OOB_int
AddressSanitizer-Unit :: ./Asan-x86_64-inline-Test.exe/AddressSanitizer.LargeOOBRightTest
AddressSanitizer-Unit :: ./Asan-x86_64-inline-Test.exe/AddressSanitizer.OOBRightTest
AddressSanitizer-Unit :: ./Asan-x86_64-inline-Test.exe/AddressSanitizer.OOB_char
AddressSanitizer-Unit :: ./Asan-x86_64-inline-Test.exe/AddressSanitizer.OOB_int
Modified:
compiler-rt/trunk/lib/asan/tests/asan_oob_test.cpp
Modified: compiler-rt/trunk/lib/asan/tests/asan_oob_test.cpp
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/tests/asan_oob_test.cpp?rev=367874&r1=367873&r2=367874&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/tests/asan_oob_test.cpp (original)
+++ compiler-rt/trunk/lib/asan/tests/asan_oob_test.cpp Mon Aug 5 08:10:15 2019
@@ -36,8 +36,15 @@ static std::string GetLeftOOBMessage(int
static std::string GetRightOOBMessage(int off) {
char str[100];
+#if !defined(_WIN32)
// FIXME: Fix PR42868 and remove SEGV match.
sprintf(str, "is located.*%d byte.*to the right|SEGV", off);
+#else
+ // `|` doesn't work in googletest's regexes on Windows,
+ // see googletest/docs/advanced.md#regular-expression-syntax
+ // But it's not needed on Windows anyways.
+ sprintf(str, "is located.*%d byte.*to the right", off);
+#endif
return str;
}
More information about the llvm-commits
mailing list