LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 11-19-2010, 12:54 PM   #1
AlbertJJ
LQ Newbie
 
Registered: Oct 2010
Posts: 12

Rep: Reputation: 0
Question gdb output


Can anybody help me understand this:

Starting program: /root/readwrite /vx/mirrored1/fload_1/ 4
[Thread debugging using libthread_db enabled]
[New Thread -1208797504 (LWP 5779)]
[New Thread -1208800368 (LWP 5782)]

str1->dir_Name: /vx/mirrored1/fload_1/

dirName: /vx/mirrored1/fload_1/
[New Thread -1219290224 (LWP 5783)]

str1->dir_Name: /vx/mirrored1/fload_1/

dirName: /vx/mirrored1/fload_1/
[New Thread -1229780080 (LWP 5784)]

str1->dir_Name: /vx/mirrored1/fload_1/

dirName: /vx/mirrored1/fload_1/

File Name: /vx/mirrored1/fload_1/.
[New Thread -1240269936 (LWP 5785)]
*** glibc detected *** /root/readwrite: munmap_chunk(): invalid pointer: 0x08a04030 ***
======= Backtrace: =========
/lib/libc.so.6(cfree+0x1bb)[0x6da15b]
/root/readwrite[0x8048b75]
/lib/libc.so.6(__libc_start_main+0xdc)[0x683dec]
/root/readwrite[0x8048751]
======= Memory map: ========
00236000-00237000 r-xp 00236000 00:00 0 [vdso]
00650000-0066a000 r-xp 00000000 03:02 262708 /lib/ld-2.5.so
0066a000-0066b000 r-xp 00019000 03:02 262708 /lib/ld-2.5.so
0066b000-0066c000 rwxp 0001a000 03:02 262708 /lib/ld-2.5.so
0066e000-007ab000 r-xp 00000000 03:02 262709 /lib/libc-2.5.so
007ab000-007ad000 r-xp 0013d000 03:02 262709 /lib/libc-2.5.so
007ad000-007ae000 rwxp 0013f000 03:02 262709 /lib/libc-2.5.so
007ae000-007b1000 rwxp 007ae000 00:00 0
007e2000-007f5000 r-xp 00000000 03:02 262711 /lib/libpthread-2.5.so
007f5000-007f6000 r-xp 00012000 03:02 262711 /lib/libpthread-2.5.so
007f6000-007f7000 rwxp 00013000 03:02 262711 /lib/libpthread-2.5.so
007f7000-007f9000 rwxp 007f7000 00:00 0
00922000-0092d000 r-xp 00000000 03:02 262718 /lib/libgcc_s-4.1.2-20080102.so.1
0092d000-0092e000 rwxp 0000a000 03:02 262718 /lib/libgcc_s-4.1.2-20080102.so.1
08048000-0804a000 r-xp 00000000 03:02 3517332 /root/readwrite
0804a000-0804b000 r--p 00001000 03:02 3517332 /root/readwrite
0804b000-0804c000 rw-p 00002000 03:02 3517332 /root/readwrite
08a04000-08a25000 rw-p 08a04000 00:00 0
b572f000-b5730000 ---p b572f000 00:00 0
b5730000-b6130000 rw-p b5730000 00:00 0
b6130000-b6131000 ---p b6130000 00:00 0
b6131000-b6b31000 rw-p b6131000 00:00 0
b6b31000-b6b32000 ---p b6b31000 00:00 0
b6b32000-b7532000 rw-p b6b32000 00:00 0
b7532000-b7533000 ---p b7532000 00:00 0
b7533000-b7f35000 rw-p b7533000 00:00 0
b7f48000-b7f49000 rw-p b7f48000 00:00 0
bfa9c000-bfab2000 rw-p bfa9c000 00:00 0 [stack]
File Name: /vx/mirrored1/fload_1/.
Program received signal SIGABRT, Aborted.
[Switching to Thread -1208797504 (LWP 5779)]
0x00236402 in __kernel_vsyscall ()
(gdb) bt
#0 0x00236402 in __kernel_vsyscall ()
#1 0x00696d10 in raise () from /lib/libc.so.6
#2 0x00698621 in abort () from /lib/libc.so.6
#3 0x006cee5b in __libc_message () from /lib/libc.so.6
#4 0x006da15b in free () from /lib/libc.so.6
#5 0x08048b75 in main ()
(gdb)


How to understand what has happened? there are multiple free statements but how to tell which one violated the limits...??
 
Old 11-19-2010, 02:44 PM   #2
orgcandman
Member
 
Registered: May 2002
Location: dracut MA
Distribution: Ubuntu; PNE-LE; LFS (no book)
Posts: 573

Rep: Reputation: 91
This usually indicates you corrupted a block of memory by writing outside the bounds of block you requested.
You can usually use valgrind to isolate which memory write is causing problems.
 
  


Reply

Tags
segmentation fault


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
gdb/Core Dump: "warning: Can't read pathname for load map: Input/output error." pr_deltoid Programming 2 07-03-2010 12:04 PM
gdb: Input/output error disheng Programming 2 09-20-2009 10:09 PM
No symbol/function name appears in GDB output and it prints ?? instead jaianand Linux - Newbie 3 05-15-2009 04:59 PM
understanding gdb output of a C function in disassembled form. koodoo Programming 7 04-12-2006 10:55 AM
gdb .. looking for 32 bit gdb.. for ia64 suse.. nkshirsagar Suse/Novell 0 12-09-2004 03:02 AM


All times are GMT -5. The time now is 04:37 AM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration