1
0
mirror of https://github.com/ioacademy-jikim/debugging synced 2025-06-08 00:16:11 +00:00
2015-12-13 22:34:58 +09:00

26 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;
}