一个多线程的大程序运行的时候崩掉了,屏幕上打出这个:
*** glibc detected *** corrupted double-linked list: 0xb78381d8 ***
三个原因
1.
int* a = new int(10);
delete a;
delete a; // <---- 这个
2. int* a;
delete a; // <---- 这个
3. char s[10];
int* a = new int(10);
sprintf(s, "1234567890");
delete a; // a 被前面的给覆盖了
转自:https://blog.csdn.net/yalisiyi1/article/details/9284391