[compiler-rt] 650baf2 - [msan] Fix strxfrm test

Vitaly Buka via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 17 02:21:46 PDT 2020


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);


        


More information about the llvm-commits mailing list