allwinner_a64/android/external/valgrind/memcheck/tests/accounting.c
2018-08-08 16:14:42 +08:00

25 lines
232 B
C

/*
* test case for valgrind realloc() bug
*/
#include <stdlib.h>
#include <assert.h>
int
main(void)
{
void *p;
void *r;
p = malloc(1);
assert(p != NULL);
r = realloc(p, -1);
assert(r == NULL);
free(p);
return 0;
}