This is the mail archive of the gdb-prs@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gdb/1627: gdb crashes inside malloc when running something


>Number:         1627
>Category:       gdb
>Synopsis:       gdb crashes inside malloc when running something
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sun Apr 25 16:58:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     tester@tester.ca
>Release:        6.0 and 6.1
>Organization:
>Environment:

>Description:
When I try to "run" something inside gdb 6.x (any program). Gdb segfaults inside malloc.. Follows a stack trace I made using gdb 5.2.. which does not have this problem. I'm not sure its gdb related, it might be a glibc problem.. But I dont see why it would show up only in gdb.

(gdb) r ./gdb
Starting program: /home/tester/gdb6test/bin/gdb ./gdb
warning: 
Program received signal SIGSEGV, Segmentation fault.
_int_malloc (av=0x401be620, bytes=8) at malloc.c:3879
3879    malloc.c: No such file or directory.
        in malloc.c
(gdb) bt
#0  _int_malloc (av=0x401be620, bytes=8) at malloc.c:3879
#1  0x40102bad in __libc_malloc (bytes=100) at malloc.c:3296
#2  0x400f8813 in _IO_vasprintf (result_ptr=0xbfffe750, 
    format=0x8 <Address 0x8 out of bounds>, 
    args=0x8 <Address 0x8 out of bounds>) at vasprintf.c:49
#3  0x08082382 in xvasprintf (ret=0xbfffe750, 
    format=0x8 <Address 0x8 out of bounds>, ap=0x8 <Address 0x8 out of bounds>)
    at utils.c:1176
#4  0x08083872 in vfprintf_unfiltered (stream=0x8, 
    format=0x8 <Address 0x8 out of bounds>, 
    args=0x8 <Address 0x8 out of bounds>) at utils.c:2281
#5  0x080818be in vwarning (
    string=0x821d3a0 "no loadable sections found in added symbol-file %s")
    at utils.c:578
#6  0x08081908 in warning (string=0x8 <Address 0x8 out of bounds>)
    at utils.c:595
#7  0x080f0c6d in syms_from_objfile (objfile=0x870e940, addrs=0x85d83e8, 
    offsets=0x821d3a0, num_offsets=0, mainline=0, verbo=8) at symfile.c:591
#8  0x080f0e70 in symbol_file_add_with_addrs_or_offsets (
    name=0x87077a0 "/lib/.debug/libm-2.3.2.so.dbg", from_tty=0, 
    addrs=0x85d83e8, offsets=0x8, num_offsets=8, mainline=0, flags=8)
    at symfile.c:829
#9  0x080f10b9 in symbol_file_add (name=0x8 <Address 0x8 out of bounds>, 
---Type <return> to continue, or q <return> to quit---
    from_tty=8, addrs=0x8, mainline=8, flags=8) at symfile.c:920
#10 0x080f0f07 in symbol_file_add_with_addrs_or_offsets (
    name=0x85c3328 "/lib/libm.so.6", from_tty=0, addrs=0x85d8058, offsets=0x8, 
    num_offsets=8, mainline=0, flags=8) at symfile.c:859
#11 0x080f10b9 in symbol_file_add (name=0x8 <Address 0x8 out of bounds>, 
    from_tty=8, addrs=0x8, mainline=8, flags=8) at symfile.c:920
#12 0x0808b505 in symbol_add_stub (arg=0x85c3120) at solib.c:354
#13 0x0807f431 in do_catch_errors (uiout=0x82cddb0, data=0x8) at top.c:523
#14 0x0807f2b0 in catcher (func=0x807f420 <do_catch_errors>, 
    func_uiout=0x82cddb0, func_args=0xbfffea20, func_val=0xbfffea18, 
    func_caught=0xbfffea1c, errstring=0x8 <Address 0x8 out of bounds>, 
    gdberrmsg=0x0, mask=6) at top.c:430
#15 0x0807f490 in catch_errors (func=0x8, func_args=0x8, 
    errstring=0x8 <Address 0x8 out of bounds>, mask=8) at top.c:535
#16 0x0808b851 in solib_add (pattern=0x0, from_tty=0, target=0x8, readsyms=1)
    at solib.c:581
#17 0x080ff574 in handle_inferior_event (ecs=0xbfffeb50) at infrun.c:2398
#18 0x080fe25f in wait_for_inferior () at infrun.c:1047
#19 0x080fe016 in proceed (addr=3221220176, siggnal=137714192, 
    step=-1073747052) at infrun.c:852
#20 0x08124bbc in find_default_create_inferior (exec_file=0x401be668 "", 
    allargs=0x401be668 "", env=0x401be668) at target.c:1356
#21 0x080fab8a in run_command (args=0x829c8da "./gdb", from_tty=136446320)
---Type <return> to continue, or q <return> to quit---
    at infcmd.c:475
#22 0x080ae059 in do_cfunc (c=0x8, args=0x8 <Address 0x8 out of bounds>, 
    from_tty=8) at cli/cli-decode.c:57
#23 0x080aff4c in cmd_func (cmd=0x82b53a0, 
    args=0x8 <Address 0x8 out of bounds>, from_tty=8) at cli/cli-decode.c:1541
#24 0x0807f806 in execute_command (p=0x829c8de "b", from_tty=137057184)
    at top.c:743
#25 0x0810bd8f in command_handler (command=0x829c8d8 "") at event-top.c:500
#26 0x0810c1d5 in command_line_handler (rl=0x83077c0 "\020\b0\b")
    at event-top.c:793
#27 0x081e1505 in rl_callback_read_char () at callback.c:123
#28 0x0810b6db in rl_callback_read_char_wrapper (client_data=0x0)
    at event-top.c:166
#29 0x0810bc8a in stdin_event_handler (error=0, client_data=0x8)
    at event-top.c:416
#30 0x0810af6e in handle_file_event (event_file_desc=1075570280)
    at event-loop.c:721
#31 0x0810aa29 in process_event () at event-loop.c:334
#32 0x0810aa88 in gdb_do_one_event (data=0x0) at event-loop.c:371
#33 0x0807f431 in do_catch_errors (uiout=0x82cddb0, data=0x8) at top.c:523
#34 0x0807f2b0 in catcher (func=0x807f420 <do_catch_errors>, 
    func_uiout=0x82cddb0, func_args=0xbfffef10, func_val=0xbfffef08, 
    func_caught=0xbfffef0c, errstring=0x8 <Address 0x8 out of bounds>, 
---Type <return> to continue, or q <return> to quit---
    gdberrmsg=0x0, mask=6) at top.c:430
#35 0x0807f490 in catch_errors (func=0x8, func_args=0x8, 
    errstring=0x8 <Address 0x8 out of bounds>, mask=8) at top.c:535
#36 0x080bc824 in tui_command_loop (data=0x0) at tui/tui-interp.c:150
#37 0x08108799 in current_interp_command_loop () at interps.c:277
#38 0x0807a91b in captured_command_loop (data=0x0) at main.c:97
#39 0x0807f431 in do_catch_errors (uiout=0x82cddb0, data=0x8) at top.c:523
#40 0x0807f2b0 in catcher (func=0x807f420 <do_catch_errors>, 
    func_uiout=0x82cddb0, func_args=0xbffff0a0, func_val=0xbffff098, 
    func_caught=0xbffff09c, errstring=0x8 <Address 0x8 out of bounds>, 
    gdberrmsg=0x0, mask=6) at top.c:430
#41 0x0807f490 in catch_errors (func=0x8, func_args=0x8, 
    errstring=0x8 <Address 0x8 out of bounds>, mask=8) at top.c:535
#42 0x0807b2e4 in captured_main (data=0x0) at main.c:805
#43 0x0807f431 in do_catch_errors (uiout=0x827bb80, data=0x8) at top.c:523
#44 0x0807f2b0 in catcher (func=0x807f420 <do_catch_errors>, 
    func_uiout=0x827bb80, func_args=0xbffff360, func_val=0xbffff358, 
    func_caught=0xbffff35c, errstring=0x8 <Address 0x8 out of bounds>, 
    gdberrmsg=0x0, mask=6) at top.c:430
#45 0x0807f490 in catch_errors (func=0x8, func_args=0x8, 
    errstring=0x8 <Address 0x8 out of bounds>, mask=8) at top.c:535
#46 0x0807b763 in gdb_main (args=0x401be668) at main.c:814
#47 0x0807a8fe in main (argc=8, argv=0x8) at gdb.c:35
---Type <return> to continue, or q <return> to quit---
#48 0x400a78d2 in __libc_start_main (main=0x807a8d0 <main>, argc=2, 
    ubp_av=0xbffff444, init=0x81f86b0 <__libc_csu_init>, 
    fini=0x81f8710 <__libc_csu_fini>, rtld_fini=0x400162a0 <_rtld_local>, 
    stack_end=0x401be668) at ../sysdeps/generic/libc-start.c:208
>How-To-Repeat:
./gdb "any program"
run
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]