开发者

glibc detected *** ./a.out: free(): invalid pointer:

when i compiled(c++ program) in linux i am getting following error pls help me

glibc detected *** ./a.out: free(): invalid pointer:0x0804878d ***
======= Backtrace: =========
/lib/libc.so.6[0xbd5f18]
/lib/libc.so.6(__libc_free+0x79)[0xbd941d]
/usr/lib/libstdc++.so.6(_ZdlPv+0x21)[0x3233fe1]
./a.out(__gxx_personality_v0+0x100)[0x8048514]
./a.out(__gxx_personality_v0+0x176)[0x8048开发者_运维技巧58a]
/lib/libc.so.6(__libc_start_main+0xdc)[0xb877e4]
./a.out(__gxx_personality_v0+0x5d)[0x8048471]
======= Memory map: ========
00b55000-00b6e000 r-xp 00000000 fd:00 6687029    /lib/ld-2.4.so
00b6e000-00b6f000 r-xp 00018000 fd:00 6687029    /lib/ld-2.4.so
00b6f000-00b70000 rwxp 00019000 fd:00 6687029    /lib/ld-2.4.so
00b72000-00c9e000 r-xp 00000000 fd:00 6687030    /lib/libc-2.4.so
00c9e000-00ca1000 r-xp 0012b000 fd:00 6687030    /lib/libc-2.4.so
00ca1000-00ca2000 rwxp 0012e000 fd:00 6687030    /lib/li


glibc detected * ./a.out: free(): invalid pointer:0x0804878d *

This means you probablydeleted a pointer that hasn't been created with new.

If you want any useful help, you really should post the code that generates this problem.


If you look at these two lines of the stack trace, you will see that the page that starts at 0x8048000 must be executable (because two addresses within that page, 0x8048514 and 0x804858a appear as return addresses on the stack).

./a.out(__gxx_personality_v0+0x100)[0x8048514] ./a.out(__gxx_personality_v0+0x176)[0x804858a]

The address you are trying to free, 0x0804878d, is at offset 0x78d in that same page so it probably points to code and definitely points within a page that is executable.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜