repo.or.cz
/
llvm-project.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git]
/
compiler-rt
/
test
/
msan
/
Linux
/
strerror_r.cpp
blob
aec653f9c0256bd1d450a64df43e4176aad79c42
1
// RUN: %clang_msan -O0 -g %s -o %t && %run %t
2
3
#include <assert.h>
4
#include <errno.h>
5
#include <string.h>
6
7
int
main
() {
8
char
buf
[
1000
];
9
char
*
res
=
strerror_r
(
EINVAL
,
buf
,
sizeof
(
buf
));
10
assert
(
res
);
11
volatile
int
z
=
strlen
(
res
);
12
13
res
=
strerror_r
(-
1
,
buf
,
sizeof
(
buf
));
14
assert
(
res
);
15
z
=
strlen
(
res
);
16
17
return
0
;
18
}