xref: /aosp_15_r20/external/compiler-rt/test/msan/ctermid.cc (revision 7c3d14c8b49c529e04be81a3ce6f5cc23712e4c6)
1 // RUN: %clangxx_msan -std=c++11 -O0 %s -o %t && %run %t
2 
3 #include <sanitizer/msan_interface.h>
4 #include <stdio.h>
5 #include <string.h>
6 
main(void)7 int main(void) {
8   unsigned char s[L_ctermid + 1];
9   char *res = ctermid((char *)s);
10   if (res)
11     printf("%zd\n", strlen(res));
12   return 0;
13 }
14