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
tests/vg_regtest: Always evaluate prerequisite expressions with sh
[valgrind.git]
/
memcheck
/
tests
/
accounting.c
blob
1654bb0288f4fb5e90219c22e71fd140114de41d
1
/*
2
* test case for valgrind realloc() bug
3
*/
4
5
#include <stdlib.h>
6
#include <assert.h>
7
8
int
9
main
(
void
)
10
{
11
void
*
p
;
12
void
*
r
;
13
14
p
=
malloc
(
1
);
15
assert
(
p
!=
NULL
);
16
17
r
=
realloc
(
p
, -
1
);
18
assert
(
r
==
NULL
);
19
20
free
(
p
);
21
22
return
0
;
23
}
24
25