#include <stdlib.h>
int main() {
int *t = (int *)malloc(10);
free(t);
free(t);
}
Example output:
[ 26 ] 9.13-15 -: setenv MALLOC_CHECK_ 1
[ 27 ] 9.13-15 -: ./test
malloc: using debugging hooks
free(): invalid pointer 0x8049560!