bug-gdb
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

GDB 5.0 (i686-pc-linux-gnu) crashes displaying main_arena


From: Andreas Zeller
Subject: GDB 5.0 (i686-pc-linux-gnu) crashes displaying main_arena
Date: Wed, 10 Jan 2001 14:47:53 +0100 (CET)

Hi!

Here's a simple bug report:

1. Load any C program into GDB 5.0 (i686-pc-linux-gnu)
2. Place a breakpoint somewhere.
3. Run the program.
4. Enter `display main_arena'. (`main_arena' is a variable from glibc malloc.)
5. Re-run the program.

Oops.  Segmentation fault.

Screenshot is included below.

Best wishes,

Andreas (who is just setting up DDD to restart GDB after a crash :-)


Appendix - screen shot:

$ gdb a.out
GNU gdb 5.0
Copyright 2000 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu"...Reading symbols from a.out...
done.

(gdb) list
Reading in symbols for demo.c...done.
1       int main()
2       {
3           void *p = malloc(100);
4           return 0;
5       }
(gdb) b 3
Breakpoint 1 at 0x8048406: file demo.c, line 3.
(gdb) r
Starting program: /home/st/andreas/tmp/a.out 
Reading symbols from /lib/libc.so.6...done.
Reading symbols from /lib/ld-linux.so.2...done.
Reading in symbols for dl-debug.c... and rtld.c... and dl-load.c...done.

Breakpoint 1, main () at demo.c:3
3           void *p = malloc(100);
(gdb) display main_arena
Reading in symbols for malloc.c... and soinit.c... and localeconv.c... and 
setlocale.c... and ../sysdeps/generic/libc-start.c... and 
../sysdeps/unix/sysv/linux/init-first.c... and assert.c... and assert-perr.c...
 and ctype-info.c... and ctype.c... and ../sysdeps/generic/sigjmp.c... and 
findlocale.c... and set-init.c... and bindtextdom.c...done.
1: main_arena = {
  av = {0x0, 0x0, 0x40109d40, 0x40109d40, 0x40109d48, 0x40109d48, 0x40109d50, 
    0x40109d50, 0x40109d58, 0x40109d58, 0x40109d60, 0x40109d60, 0x40109d68, 
    0x40109d68, 0x40109d70, 0x40109d70, 0x40109d78, 0x40109d78, 0x40109d80, 
    0x40109d80, 0x40109d88, 0x40109d88, 0x40109d90, 0x40109d90, 0x40109d98, 
    0x40109d98, 0x40109da0, 0x40109da0, 0x40109da8, 0x40109da8, 0x40109db0, 
    0x40109db0, 0x40109db8, 0x40109db8, 0x40109dc0, 0x40109dc0, 0x40109dc8, 
    0x40109dc8, 0x40109dd0, 0x40109dd0, 0x40109dd8, 0x40109dd8, 0x40109de0, 
    0x40109de0, 0x40109de8, 0x40109de8, 0x40109df0, 0x40109df0, 0x40109df8, 
    0x40109df8, 0x40109e00, 0x40109e00, 0x40109e08, 0x40109e08, 0x40109e10, 
    0x40109e10, 0x40109e18, 0x40109e18, 0x40109e20, 0x40109e20, 0x40109e28, 
    0x40109e28, 0x40109e30, 0x40109e30, 0x40109e38, 0x40109e38, 0x40109e40, 
    0x40109e40, 0x40109e48, 0x40109e48, 0x40109e50, 0x40109e50, 0x40109e58, 
    0x40109e58, 0x40109e60, 0x40109e60, 0x40109e68, 0x40109e68, 0x40109e70, 
    0x40109e70, 0x40109e78, 0x40109e78, 0x40109e80, 0x40109e80, 0x40109e88, 
    0x40109e88, 0x40109e90, 0x40109e90, 0x40109e98, 0x40109e98, 0x40109ea0, 
    0x40109ea0, 0x40109ea8, 0x40109ea8, 0x40109eb0, 0x40109eb0, 0x40109eb8, 
    0x40109eb8, 0x40109ec0, 0x40109ec0, 0x40109ec8, 0x40109ec8, 0x40109ed0, 
---Type <return> to continue, or q <return> to quit---
    0x40109ed0, 0x40109ed8, 0x40109ed8, 0x40109ee0, 0x40109ee0, 0x40109ee8, 
    0x40109ee8, 0x40109ef0, 0x40109ef0, 0x40109ef8, 0x40109ef8, 0x40109f00, 
    0x40109f00, 0x40109f08, 0x40109f08, 0x40109f10, 0x40109f10, 0x40109f18, 
    0x40109f18, 0x40109f20, 0x40109f20, 0x40109f28, 0x40109f28, 0x40109f30, 
    0x40109f30, 0x40109f38, 0x40109f38, 0x40109f40, 0x40109f40, 0x40109f48, 
    0x40109f48, 0x40109f50, 0x40109f50, 0x40109f58, 0x40109f58, 0x40109f60, 
    0x40109f60, 0x40109f68, 0x40109f68, 0x40109f70, 0x40109f70, 0x40109f78, 
    0x40109f78, 0x40109f80, 0x40109f80, 0x40109f88, 0x40109f88, 0x40109f90, 
    0x40109f90, 0x40109f98, 0x40109f98, 0x40109fa0, 0x40109fa0, 0x40109fa8, 
    0x40109fa8, 0x40109fb0, 0x40109fb0, 0x40109fb8, 0x40109fb8, 0x40109fc0, 
    0x40109fc0, 0x40109fc8, 0x40109fc8, 0x40109fd0, 0x40109fd0, 0x40109fd8, 
    0x40109fd8, 0x40109fe0, 0x40109fe0, 0x40109fe8, 0x40109fe8, 0x40109ff0, 
    0x40109ff0, 0x40109ff8, 0x40109ff8, 0x4010a000, 0x4010a000, 0x4010a008, 
    0x4010a008, 0x4010a010, 0x4010a010, 0x4010a018, 0x4010a018, 0x4010a020, 
    0x4010a020, 0x4010a028, 0x4010a028, 0x4010a030, 0x4010a030, 0x4010a038, 
    0x4010a038, 0x4010a040, 0x4010a040, 0x4010a048, 0x4010a048, 0x4010a050, 
    0x4010a050...}, 
  next = 0x40109d40, 
  size = 0, 
  mutex = {
    __m_reserved = 0, 
    __m_count = 0, 
    __m_owner = 0x0, 
---Type <return> to continue, or q <return> to quit---
    __m_kind = 0, 
    __m_lock = {
      __status = 0, 
      __spinlock = 0
    }
  }
}
(gdb) r
The program being debugged has been started already.
Start it from the beginning? (y or n) y

Starting program: /home/st/andreas/tmp/a.out 
Reading symbols from /lib/libc.so.6...done.
Reading symbols from /lib/ld-linux.so.2...done.
Reading in symbols for dl-debug.c... and rtld.c... and dl-load.c...done.

Breakpoint 1, main () at demo.c:3
3           void *p = malloc(100);
Segmentation fault
$ _

-- 
Andreas Zeller     Universitaet Passau
                   http://www.fmi.uni-passau.de/st/staff/zeller/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]