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
llvm-svn: 367874
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;
}