llvm-project/compiler-rt/test/msan/ctermid.cpp

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
280 B
C++
Raw Normal View History

// 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;
}