当前位置: 技术问答>linux和unix
gdb调试信息
来源: 互联网 发布时间:2017-02-16
本文导语: 很少使用gdb调试,现在用了,又不知道是什么意思,求大侠指教 *** glibc detected *** /home/hhbgk/url/url: free(): invalid next size (normal): 0x0809ac30 *** ======= Backtrace: ========= /lib/i386-linux-gnu/libc.so.6(+0x6ff22)[0x1a0f22] /lib/i386-li...
很少使用gdb调试,现在用了,又不知道是什么意思,求大侠指教
*** glibc detected *** /home/hhbgk/url/url: free(): invalid next size (normal): 0x0809ac30 ***
======= Backtrace: =========
/lib/i386-linux-gnu/libc.so.6(+0x6ff22)[0x1a0f22]
/lib/i386-linux-gnu/libc.so.6(+0x70bc2)[0x1a1bc2]
/lib/i386-linux-gnu/libc.so.6(cfree+0x6d)[0x1a4cad]
/home/hhbgk/url/url[0x80491f3]
/home/hhbgk/url/url[0x80489d0]
/lib/i386-linux-gnu/libc.so.6(__libc_start_main+0xf3)[0x14a113]
/home/hhbgk/url/url[0x8048841]
======= Memory map: ========
00110000-0012e000 r-xp 00000000 08:01 801460 /lib/i386-linux-gnu/ld-2.13.so
0012e000-0012f000 r--p 0001d000 08:01 801460 /lib/i386-linux-gnu/ld-2.13.so
0012f000-00130000 rw-p 0001e000 08:01 801460 /lib/i386-linux-gnu/ld-2.13.so
00130000-00131000 r-xp 00000000 00:00 0 [vdso]
00131000-002a9000 r-xp 00000000 08:01 801792 /lib/i386-linux-gnu/libc-2.13.so
002a9000-002ab000 r--p 00178000 08:01 801792 /lib/i386-linux-gnu/libc-2.13.so
002ab000-002ac000 rw-p 0017a000 08:01 801792 /lib/i386-linux-gnu/libc-2.13.so
002ac000-002af000 rw-p 00000000 00:00 0
002af000-002ba000 r-xp 00000000 08:01 801879 /lib/i386-linux-gnu/libnss_files-2.13.so
002ba000-002bb000 r--p 0000a000 08:01 801879 /lib/i386-linux-gnu/libnss_files-2.13.so
002bb000-002bc000 rw-p 0000b000 08:01 801879 /lib/i386-linux-gnu/libnss_files-2.13.so
002bc000-002be000 r-xp 00000000 08:01 786500 /lib/libnss_mdns4_minimal.so.2
002be000-002bf000 r--p 00001000 08:01 786500 /lib/libnss_mdns4_minimal.so.2
002bf000-002c0000 rw-p 00002000 08:01 786500 /lib/libnss_mdns4_minimal.so.2
002c0000-002c5000 r-xp 00000000 08:01 801873 /lib/i386-linux-gnu/libnss_dns-2.13.so
002c5000-002c6000 r--p 00004000 08:01 801873 /lib/i386-linux-gnu/libnss_dns-2.13.so
002c6000-002c7000 rw-p 00005000 08:01 801873 /lib/i386-linux-gnu/libnss_dns-2.13.so
002c7000-002da000 r-xp 00000000 08:01 801898 /lib/i386-linux-gnu/libresolv-2.13.so
002da000-002db000 r--p 00012000 08:01 801898 /lib/i386-linux-gnu/libresolv-2.13.so
002db000-002dc000 rw-p 00013000 08:01 801898 /lib/i386-linux-gnu/libresolv-2.13.so
002dc000-002de000 rw-p 00000000 00:00 0
002de000-002fa000 r-xp 00000000 08:01 787388 /lib/i386-linux-gnu/libgcc_s.so.1
002fa000-002fb000 r--p 0001b000 08:01 787388 /lib/i386-linux-gnu/libgcc_s.so.1
002fb000-002fc000 rw-p 0001c000 08:01 787388 /lib/i386-linux-gnu/libgcc_s.so.1
08048000-0804a000 r-xp 00000000 08:01 660884 /home/hhbgk/url/url
0804a000-0804b000 r--p 00001000 08:01 660884 /home/hhbgk/url/url
0804b000-0804c000 rw-p 00002000 08:01 660884 /home/hhbgk/url/url
0804c000-080ae000 rw-p 00000000 00:00 0 [heap]
b7e00000-b7e21000 rw-p 00000000 00:00 0
b7e21000-b7f00000 ---p 00000000 00:00 0
b7fee000-b7fef000 rw-p 00000000 00:00 0
b7ffc000-b8000000 rw-p 00000000 00:00 0
bffdf000-c0000000 rw-p 00000000 00:00 0 [stack]
Program received signal SIGABRT, Aborted.
0x00130416 in __kernel_vsyscall ()
|
free(): invalid next size (normal): 0x0809ac30
楼主看下是不是free了没有用malloc或者realloc分配的内存
楼主看下是不是free了没有用malloc或者realloc分配的内存
|
你free的地址:0x0809ac30
在栈中
0804c000-080ae000 rw-p 00000000 00:00 0 [heap]
b7e00000-b7e21000 rw-p 00000000 00:00 0
b7e21000-b7f00000 ---p 00000000 00:00 0
b7fee000-b7fef000 rw-p 00000000 00:00 0
b7ffc000-b8000000 rw-p 00000000 00:00 0
bffdf000-c0000000 rw-p 00000000 00:00 0 [stack]
而系统调用free是不允许释放栈的内存,应该free malloc分配的内存
在栈中
0804c000-080ae000 rw-p 00000000 00:00 0 [heap]
b7e00000-b7e21000 rw-p 00000000 00:00 0
b7e21000-b7f00000 ---p 00000000 00:00 0
b7fee000-b7fef000 rw-p 00000000 00:00 0
b7ffc000-b8000000 rw-p 00000000 00:00 0
bffdf000-c0000000 rw-p 00000000 00:00 0 [stack]
而系统调用free是不允许释放栈的内存,应该free malloc分配的内存