[compiler-rt][MSAN][test] Update buffersize for UTF-8 to C convert
authorJinsong Ji <jji@us.ibm.com>
Mon, 13 Jul 2020 21:19:18 +0000 (21:19 +0000)
committerJinsong Ji <jji@us.ibm.com>
Mon, 13 Jul 2020 22:12:55 +0000 (22:12 +0000)
This is exposed by https://reviews.llvm.org/D83486.
When the host is UTF8, we may get n >10, causing assert failure.
Increase the buffersize to support UTF-8 to C conversion.

Reviewed By: vitalybuka

Differential Revision: https://reviews.llvm.org/D83719

compiler-rt/test/msan/strxfrm.cpp

index 94b8c70..d40b56b 100644 (file)
@@ -7,7 +7,7 @@
 #include <string.h>
 
 int main(void) {
-  char q[10];
+  char q[30];
   size_t n = strxfrm(q, "abcdef", sizeof(q));
   assert(n < sizeof(q));
   __msan_check_mem_is_initialized(q, n + 1);