/* Commandline execution: * civl verify mallocBad3.cvl * */ #include void main() { $heap h = $heap_create(), h0 = $heap_create(); double *p = (double *) $malloc(h, 5*sizeof(double)); p[4]=3.14; $assert(p[4]==3.14); // Free pointer from the wrong heap. $free(h0, p); }