repo.or.cz
/
valgrind.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
xen: Infratructure for XEN_TMEM_* hypercalls
[valgrind.git]
/
memcheck
/
tests
/
badrw.c
blob
d711ec969b771c4795f0580bfe29e2cf43fd3bfb
1
#include <stdlib.h>
2
3
int
main
(
void
)
4
{
5
void
*
x
=
malloc
(
10
);
6
7
int
*
x4
;
8
short
*
x2
;
9
char
*
x1
;
10
int
y4
;
11
short
y2
;
12
char
y1
;
13
14
x4
=
x
-
4
;
15
x2
=
x
-
4
;
16
x1
=
x
-
1
;
17
18
// Invalid reads and writes of sizes 4, 2, 1
19
y4
= *
x4
;
20
*
x4
=
y4
;
21
22
y2
= *
x2
;
23
*
x2
=
y2
;
24
25
y1
= *
x1
;
26
*
x1
=
y1
;
27
28
return
0
;
29
}