1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
#include <stdio.h> int main() { int* p = malloc(sizeof(int)); free(p); malloc(sizeof(int)); // at this point, p has already been freed; *p = 2; printf("no crash.\n"); return 0; }
1
no crash.