diff options
author | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2015-12-14 22:57:49 +0000 |
---|---|---|
committer | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2015-12-14 22:57:49 +0000 |
commit | ffbfb1371ee75516a8a18f395495247ae5cd3a0f (patch) | |
tree | 67f585c26a2adf1ba540d2427096ddc41449557a /test | |
parent | 3207ae6296838cec957377e85b6f516f3ed2f747 (diff) |
[msan] Intercept ctermid, ctermid_r.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@255566 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/msan/ctermid.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/msan/ctermid.cc b/test/msan/ctermid.cc new file mode 100644 index 000000000..a2818e630 --- /dev/null +++ b/test/msan/ctermid.cc @@ -0,0 +1,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; +} |