diff options
author | Tim Northover <tnorthover@apple.com> | 2016-10-24 19:07:27 +0000 |
---|---|---|
committer | Tim Northover <tnorthover@apple.com> | 2016-10-24 19:07:27 +0000 |
commit | 5adb224bc21a1c2f3ba1f9f0569a1d2b0a8845a9 (patch) | |
tree | 5edde0a75fe68db44a80eea6e886702b21c9e493 | |
parent | da99e33ae3d93302a7395f6c2bbe8f69cafc717a (diff) | |
download | bcm5719-llvm-5adb224bc21a1c2f3ba1f9f0569a1d2b0a8845a9.tar.gz bcm5719-llvm-5adb224bc21a1c2f3ba1f9f0569a1d2b0a8845a9.zip |
[asan] relax strstr tests.
Darwin's implementation of strstr seems to trigger slightly different failure
modes from Linux since it calls strncmp. All messages seem about equally useful
and correct, so I relaxed the tests so Darwin can pass.
llvm-svn: 285004
-rw-r--r-- | compiler-rt/test/asan/TestCases/strstr-1.c | 2 | ||||
-rw-r--r-- | compiler-rt/test/asan/TestCases/strstr_strict.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/compiler-rt/test/asan/TestCases/strstr-1.c b/compiler-rt/test/asan/TestCases/strstr-1.c index d0fa25bc62b..06a8a8a55d9 100644 --- a/compiler-rt/test/asan/TestCases/strstr-1.c +++ b/compiler-rt/test/asan/TestCases/strstr-1.c @@ -15,7 +15,7 @@ int main(int argc, char **argv) { char s1[4] = "acb"; __asan_poison_memory_region ((char *)&s1[2], 2); r = strstr(s1, s2); - // CHECK:'s1' <== Memory access at offset {{[0-9]+}} partially overflows this variable + // CHECK:'s1' <== Memory access at offset {{[0-9]+}} {{partially overflows this variable|is inside this variable}} assert(r == s1 + 1); return 0; } diff --git a/compiler-rt/test/asan/TestCases/strstr_strict.c b/compiler-rt/test/asan/TestCases/strstr_strict.c index 35ad93c645d..63e6b25a017 100644 --- a/compiler-rt/test/asan/TestCases/strstr_strict.c +++ b/compiler-rt/test/asan/TestCases/strstr_strict.c @@ -17,7 +17,7 @@ int main(int argc, char **argv) { s2[size - 1]='\0'; char* r = strstr(s1, s2); // CHECK: {{.*ERROR: AddressSanitizer: heap-buffer-overflow on address}} - // CHECK: READ of size 101 + // CHECK: READ of size {{101|100}} assert(r == s1); free(s1); free(s2); |