[compiler-rt] r372143 - Remove asan test for strncat(x, y, 0)
David Bolvansky via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 17 10:17:30 PDT 2019
Author: xbolva00
Date: Tue Sep 17 10:17:30 2019
New Revision: 372143
URL: http://llvm.org/viewvc/llvm-project?rev=372143&view=rev
Log:
Remove asan test for strncat(x, y, 0)
Modified:
compiler-rt/trunk/lib/asan/tests/asan_str_test.cpp
Modified: compiler-rt/trunk/lib/asan/tests/asan_str_test.cpp
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/tests/asan_str_test.cpp?rev=372143&r1=372142&r2=372143&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/tests/asan_str_test.cpp (original)
+++ compiler-rt/trunk/lib/asan/tests/asan_str_test.cpp Tue Sep 17 10:17:30 2019
@@ -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));
More information about the llvm-commits
mailing list