一個多線程的大程序運行的時候崩掉了,屏幕上打出這個:
*** 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