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
/
realloc1.c
blob
91878b332486909a0194af59fcd62fe81f1b1584
1
2
/* Anyone know what this is supposed to test? I don't
3
(JRS 2003-07-07) -- which ain't good considering I
4
probably created it :)
5
*/
6
7
#include <stdio.h>
8
#include <stdlib.h>
9
10
int
main
(
void
)
11
{
12
int
i
;
13
char
*
p
=
malloc
(
1
);
14
for
(
i
=
2
;
i
<
50
;
i
++) {
15
p
=
realloc
(
p
,
i
);
16
p
[
i
-
1
] =
'z'
;
17
}
18
return
0
;
19
}