[compiler-rt] r372141 - [ASAN] Adjust asan tests due to new optimizations

Roman Lebedev via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 17 10:32:08 PDT 2019


On Tue, Sep 17, 2019 at 8:05 PM David Bolvansky via llvm-commits
<llvm-commits at lists.llvm.org> wrote:
>
> Author: xbolva00
> Date: Tue Sep 17 10:07:31 2019
> New Revision: 372141
>
> URL: http://llvm.org/viewvc/llvm-project?rev=372141&view=rev
> Log:
> [ASAN] Adjust asan tests due to new optimizations
Commit message does not explain what is actually going on?

> 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=372141&r1=372140&r2=372141&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:07:31 2019
> @@ -454,7 +454,7 @@ TEST(AddressSanitizer, StrNCatOOBTest) {
>    size_t from_size = Ident(20);
>    char *from = MallocAndMemsetString(from_size);
>    // Normal strncat calls.
> -  strncat(to, from, 0);
> +  strncat(to, from, 1);
The old test was specifically checking what happens with len=0

>    strncat(to, from, from_size);
>    from[from_size - 1] = '\0';
>    strncat(to, from, 2 * from_size);
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits


More information about the llvm-commits mailing list