[compiler-rt] 650baf2 - [msan] Fix strxfrm test
Hans Wennborg via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 17 04:27:59 PDT 2020
Thanks! Cherry-pick to release/11.x as b35b720f5c95a0e8725a0a62337f87a452a93fe3
On Fri, Jul 17, 2020 at 11:21 AM Vitaly Buka via llvm-commits
<llvm-commits at lists.llvm.org> wrote:
>
>
> Author: Vitaly Buka
> Date: 2020-07-17T02:21:18-07:00
> New Revision: 650baf22e69fff99bbfbea65edcd8e202b05fdff
>
> URL: https://github.com/llvm/llvm-project/commit/650baf22e69fff99bbfbea65edcd8e202b05fdff
> DIFF: https://github.com/llvm/llvm-project/commit/650baf22e69fff99bbfbea65edcd8e202b05fdff.diff
>
> LOG: [msan] Fix strxfrm test
>
> Revert D83719 and explicitly set locate to "C".
>
> Added:
>
>
> Modified:
> compiler-rt/test/msan/strxfrm.cpp
>
> Removed:
>
>
>
> ################################################################################
> diff --git a/compiler-rt/test/msan/strxfrm.cpp b/compiler-rt/test/msan/strxfrm.cpp
> index d40b56b234cd..b4fee6f55c4c 100644
> --- a/compiler-rt/test/msan/strxfrm.cpp
> +++ b/compiler-rt/test/msan/strxfrm.cpp
> @@ -7,12 +7,12 @@
> #include <string.h>
>
> int main(void) {
> - char q[30];
> + char q[10];
> size_t n = strxfrm(q, "abcdef", sizeof(q));
> assert(n < sizeof(q));
> __msan_check_mem_is_initialized(q, n + 1);
>
> - locale_t loc = newlocale(LC_ALL_MASK, "", (locale_t)0);
> + locale_t loc = newlocale(LC_ALL_MASK, "C", (locale_t)0);
>
> __msan_poison(&q, sizeof(q));
> n = strxfrm_l(q, "qwerty", sizeof(q), loc);
>
>
>
> _______________________________________________
> 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