repo.or.cz
/
blocksruntime.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
[msan] Intercept strxfrm.
[blocksruntime.git]
/
test
/
msan
/
strxfrm.cc
blob
b930a6af69c4d5b9b2ff7d845e7ba589309364f6
1
// RUN: %clangxx_msan -m64 -O0 -g %s -o %t && %run %t
2
3
#include <assert.h>
4
#include <sanitizer/msan_interface.h>
5
#include <stdlib.h>
6
#include <string.h>
7
8
int
main
(
void
) {
9
const char
*
p
=
"abcdef"
;
10
char
q
[
10
];
11
size_t
n
=
strxfrm
(
q
,
p
,
sizeof
(
q
));
12
assert
(
n
<
sizeof
(
q
));
13
__msan_check_mem_is_initialized
(
q
,
n
+
1
);
14
return
0
;
15
}