|

楼主 |
发表于 2007-3-3 23:27:25
|
显示全部楼层
- #include <stdlib.h>
- #include <unistd.h>
- int main (void) {
- char *ptr = malloc(10);
- if(fork() == 0) {
- free(ptr);
- }
- free(ptr);
- return 0;
- }
复制代码 大家运行一下上面的程序看看,我这里运行报错:
*** glibc detected *** double free or corruption (fasttop): 0x0804a008 *** |
|