Remove asan test for strncat(x, y, 0)
authorDavid Bolvansky <david.bolvansky@gmail.com>
Tue, 17 Sep 2019 17:17:30 +0000 (17:17 +0000)
committerDavid Bolvansky <david.bolvansky@gmail.com>
Tue, 17 Sep 2019 17:17:30 +0000 (17:17 +0000)
llvm-svn: 372143

compiler-rt/lib/asan/tests/asan_str_test.cpp

index 50e1ab441cfa4e838003ce468e265b2a5da0ef5b..33a38a81567fc0b9fe3a0f21b3001e0cc9270857 100644 (file)
@@ -454,12 +454,10 @@ TEST(AddressSanitizer, StrNCatOOBTest) {
   size_t from_size = Ident(20);
   char *from = MallocAndMemsetString(from_size);
   // Normal strncat calls.
-  strncat(to, from, 1);
+  strncat(to, from, 0);
   strncat(to, from, from_size);
   from[from_size - 1] = '\0';
   strncat(to, from, 2 * from_size);
-  // Catenating empty string with an invalid string is still an error.
-  EXPECT_DEATH(strncat(to - 1, from, 0), LeftOOBAccessMessage(1));
   strncat(to, from + from_size - 1, 10);
   // One of arguments points to not allocated memory.
   EXPECT_DEATH(strncat(to - 1, from, 2), LeftOOBAccessMessage(1));