• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // RUN: %clangxx_msan -O0 -g %s -o %t && %run %t
2 
3 #include <assert.h>
4 #include <sanitizer/msan_interface.h>
5 #include <stdlib.h>
6 #include <string.h>
7 
main(void)8 int main(void) {
9   const char *p = "abcdef";
10   char q[10];
11   size_t n = strxfrm(q, p, sizeof(q));
12   assert(n < sizeof(q));
13   __msan_check_mem_is_initialized(q, n + 1);
14   return 0;
15 }
16