如何纠正*** glibc检测到***错误的程序 [英] How to correct *** glibc detected *** error in the program

查看:220
本文介绍了如何纠正*** glibc检测到***错误的程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


可能重复:

glibc detected error

您好,
我正在执行我的专案在GNU C ++当我收到这个错误,当我按下一个选项在开关的情况下。由于其余的程序正在执行罚款我留下这个错误。我不知道它是什么,为什么会发生。

Hi, I was executing my project in GNU C++ when i received this error when i pressed an option in the switch case. As rest of the program is executing fine i am left with this error. I don't know what it is and why it occurs. Please explain and guide me as to where i may start to look in my program.

错误详情:

*** glibc detected *** ./test.out: free(): invalid pointer: 0xbfb1c874 ***
======= Backtrace: =========
/lib/libc.so.6[0x55c0f1]
/lib/libc.so.6(cfree+0x90)[0x55fbc0]
./test.out[0x809f855]
./test.out[0x804fbc0]
./test.out[0x804f9bb]
./test.out[0x80502bb]
./test.out[0x805084e]
./test.out[0x8050d07]
/lib/libc.so.6(__libc_start_main+0xdc)[0x508e8c]
./test.out[0x8049981]
======= Memory map: ========
004f3000-00631000 r-xp 00000000 08:01 6148422    /lib/libc-2.5.so
00631000-00633000 r-xp 0013e000 08:01 6148422    /lib/libc-2.5.so
00633000-00634000 rwxp 00140000 08:01 6148422    /lib/libc-2.5.so
00634000-00637000 rwxp 00634000 00:00 0 
0078d000-007a7000 r-xp 00000000 08:01 6152013    /lib/ld-2.5.so
007a7000-007a8000 r-xp 00019000 08:01 6152013    /lib/ld-2.5.so
007a8000-007a9000 rwxp 0001a000 08:01 6152013    /lib/ld-2.5.so
007f9000-0081e000 r-xp 00000000 08:01 6148435    /lib/libm-2.5.so
0081e000-0081f000 r-xp 00024000 08:01 6148435    /lib/libm-2.5.so
0081f000-00820000 rwxp 00025000 08:01 6148435    /lib/libm-2.5.so
00b18000-00b23000 r-xp 00000000 08:01 6148439    /lib/libgcc_s-4.1.2-20080825.so.1
00b23000-00b24000 rwxp 0000a000 08:01 6148439    /lib/libgcc_s-4.1.2-20080825.so.1
08048000-080c6000 r-xp 00000000 00:1e 736543     /users/guest10/shashi/Demo/src/test.out
080c6000-080c7000 rwxp 0007e000 00:1e 736543     /users/guest10/shashi/Demo/src/test.out
080c7000-080cc000 rwxp 080c7000 00:00 0 
08d05000-218b1000 rwxp 08d05000 00:00 0          [heap]
b7e00000-b7e21000 rwxp b7e00000 00:00 0 
b7e21000-b7f00000 ---p b7e21000 00:00 0 
b7fab000-b7fac000 rwxp b7fab000 00:00 0 
b7fc4000-b7fc7000 rwxp b7fc4000 00:00 0 
b7fc7000-b7fc8000 r-xp b7fc7000 00:00 0          [vdso]
bfb0b000-bfb21000 rw-p bffe9000 00:00 0          [stack]
Abort

请帮助..感谢Adv

Please Help.. Thanks in Adv

推荐答案

如果您向我们显示代码。然而,错误是清楚的。代码释放没有或不再有效的内存。这意味着地址是错误的,因为例如在原始指针上进行指针运算。或者指针已经被释放(双自由)。

The exact solution can only be provided if you show us the code. The error is however clear. The code frees memory that is not or no longer valid. That means either the address is wrong, because for example of pointer arithmetic being done on the original pointer. Or the pointer has already been freed (double free).

这篇关于如何纠正*** glibc检测到***错误的程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆