huangcm
2025-02-24 69ed55dec4b2116a19e4cca4393cbc014fce5fb2
1
2
3
4
5
6
7
8
9
10
11
12
13
// RUN: %clangxx_msan -std=c++11 -O0 %s -o %t && %run %t
 
#include <sanitizer/msan_interface.h>
#include <stdio.h>
#include <string.h>
 
int main(void) {
  unsigned char s[L_ctermid + 1];
  char *res = ctermid((char *)s);
  if (res)
    printf("%zd\n", strlen(res));
  return 0;
}