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

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

问题描述

可能重复:结果
   glibc的检测到的错误


我正在执行我的项目在GNU C ++时,我收到此错误,当我pressed在开关的情况选择。作为该计划的其余部分正在执行罚款我留下这个错误。我不知道它是什么,以及为什么它会发生。请解释和引导我到哪里我可能会开始在我的计划看。

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

请帮助..谢谢进阶

推荐答案

如果您向我们展示了code只能提供精确的解决方案。错误然而很清楚。在code释放内存,是不是或不再有效。这意味着,无论是地址是错误的,因为指针运算的例子原始指针正在做。或指针已被释放(双免费)。

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天全站免登陆