[ASan/Win] Add a comment about DCL-using-static vs threads
[blocksruntime.git] / test / msan / strerror_r-non-gnu.c
blobd55bf42ef11eec26e02bcbe6ad5c2d33ff148e67
1 // RUN: %clang_msan -std=c99 -O0 -g %s -o %t && %run %t
3 // strerror_r under a weird set of circumstances can be redirected to
4 // __xpg_strerror_r. Test that MSan handles this correctly.
6 #define _POSIX_C_SOURCE 200112
7 #include <assert.h>
8 #include <stdio.h>
9 #include <string.h>
10 #include <errno.h>
12 int main() {
13 char buf[1000];
14 int res = strerror_r(EINVAL, buf, sizeof(buf));
15 assert(!res);
16 volatile int z = strlen(buf);
17 return 0;