diff options
-rw-r--r-- | test/asan/TestCases/strtok.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/test/asan/TestCases/strtok.c b/test/asan/TestCases/strtok.c index 7aa263add..37c23ea2d 100644 --- a/test/asan/TestCases/strtok.c +++ b/test/asan/TestCases/strtok.c @@ -27,7 +27,7 @@ #include <string.h> #include <sanitizer/asan_interface.h> -// Check that we find overflows in the delimiters on the first call +// Check that we find overflows in the delimiters on the first call // with strict_string_checks. void test1() { char *token; @@ -36,7 +36,6 @@ void test1() { __asan_poison_memory_region ((char *)&token_delimiter[1], 2); token = strtok(s, token_delimiter); // CHECK1:'token_delimiter' <== Memory access at offset {{[0-9]+}} partially overflows this variable - assert(strcmp(token, "a") == 0); } // Check that we find overflows in the delimiters on the second call (str == NULL) @@ -50,7 +49,6 @@ void test2() { __asan_poison_memory_region ((char *)&token_delimiter[1], 2); token = strtok(NULL, token_delimiter); // CHECK2:'token_delimiter' <== Memory access at offset {{[0-9]+}} partially overflows this variable - assert(strcmp(token, "c") == 0); } // Check that we find overflows in the string (only on the first call) with strict_string_checks. @@ -61,7 +59,6 @@ void test3() { __asan_poison_memory_region ((char *)&s[3], 2); token = strtok(s, token_delimiter); // CHECK3:'s' <== Memory access at offset {{[0-9]+}} partially overflows this variable - assert(token == s); } // Check that we do not crash when strtok returns NULL with strict_string_checks. @@ -82,7 +79,6 @@ void test5() { __asan_poison_memory_region ((char *)&token_delimiter[1], 2); token = strtok(s, token_delimiter); // CHECK5:'s' <== Memory access at offset {{[0-9]+}} partially overflows this variable - assert(token == s); } // Check that we find overflows in the delimiters (only on the first call) with !strict_string_checks. @@ -93,7 +89,6 @@ void test6() { __asan_poison_memory_region ((char *)&token_delimiter[1], 2); token = strtok(s, &token_delimiter[1]); // CHECK6:'token_delimiter' <== Memory access at offset {{[0-9]+}} overflows this variable - assert(strcmp(token, "abc") == 0); } int main(int argc, char **argv) { |