This is the mail archive of the gdb-patches@sourceware.cygnus.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]

unprotected references to partial symtab (core dump fix)


This problem is reported against gdb 4.18 but remains in the 5.0 source
(which I haven't yet built successfully...)

Most references to "pst" in gdb/partial-stab.h are protected by "if (pst)"
equivalents, but two aren't.  (A third instance has been fixed in 5.0.)


*** partial-stab.h-ORIG Sun Jun 28 14:36:50 1998
--- partial-stab.h      Fri Jun 16 14:53:39 2000
***************
*** 592,596 ****
                 the partial symbol table.  */
              if (textlow_not_set
!                 || (CUR_SYMBOL_VALUE < pst->textlow
                      && CUR_SYMBOL_VALUE
                           != ANOFFSET (section_offsets, SECT_OFF_TEXT)))
--- 592,596 ----
                 the partial symbol table.  */
              if (textlow_not_set
!                 || (pst && CUR_SYMBOL_VALUE < pst->textlow
                      && CUR_SYMBOL_VALUE
                           != ANOFFSET (section_offsets, SECT_OFF_TEXT)))
***************
*** 638,642 ****
                 the partial symbol table.  */
              if (textlow_not_set
!                 || (CUR_SYMBOL_VALUE < pst->textlow
                      && CUR_SYMBOL_VALUE
                           != ANOFFSET (section_offsets, SECT_OFF_TEXT)))
--- 638,642 ----
                 the partial symbol table.  */
              if (textlow_not_set
!                 || (pst && CUR_SYMBOL_VALUE < pst->textlow
                      && CUR_SYMBOL_VALUE
                           != ANOFFSET (section_offsets, SECT_OFF_TEXT)))


GNU gdb 4.18
Copyright 1998 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 "sparc-sun-solaris2.5.1".


#0  0xa11b8 in read_dbx_symtab (section_offsets=0x2c5868, objfile=0x264750, 
    text_addr=223256, text_size=817312) at partial-stab.h:593
#1  0x9f488 in dbx_symfile_read (objfile=0x264750, section_offsets=0x2c5868,
mainline=0)
    at dbxread.c:583
#2  0xa33c8 in elfstab_build_psymtabs (objfile=0x264750,
section_offsets=0x2c5868, 
    mainline=0, staboffset=3378038, stabsize=2509536, stabstroffset=2460208, 
    stabstrsize=3378037) at dbxread.c:2630
#3  0xa6cec in elf_symfile_read (objfile=0x264750, section_offsets=0x2c5868,
mainline=0)
    at elfread.c:664
#4  0x62100 in syms_from_objfile (objfile=0x264750, addr=4013948928,
mainline=0, verbo=0)
    at symfile.c:598
#5  0x62330 in symbol_file_add (
    name=0x280b34 "", from_tty=0, 
    addr=4014172184, mainline=0, mapped=0, readnow=0, user_loaded=0,
is_solib=1)
    at symfile.c:743
#6  0x78f5c in symbol_add_stub (arg=0x280b10) at solib.c:1040
#7  0xd6b84 in catch_errors (func=0x78e88 <symbol_add_stub>, args=0x280b10, 
    errstring=0x151198 "Error while reading shared library symbols:\n",
mask=3)
    at top.c:558
#8  0x791d0 in solib_add (
    arg_string=0x280b34 "", from_tty=0, 
    target=0x78c00) at solib.c:1176
#9  0x69bf4 in wait_for_inferior () at infrun.c:2082
#10 0x68d94 in proceed (addr=0, siggnal=TARGET_SIGNAL_0, step=0) at
infrun.c:922
#11 0x7da68 in procfs_create_inferior (exec_file=0x1b7638 "", 
    allargs=0x1dee08 "", env=0x1bed68)
    at procfs.c:5522
#12 0x8a3d4 in sol_thread_create_inferior (exec_file=0x1b7638 "", 
    allargs=0x1dee08 "", env=0x1bed68)
    at sol-thread.c:831
#13 0x8cd54 in find_default_create_inferior (
    exec_file=0x1b7638 "", 
    allargs=0x1dee08 "", env=0x1bed68)
    at target.c:1080
#14 0x66ef8 in run_command (args=0x1b5cda "", 
    from_tty=1) at infcmd.c:259
#15 0xd7914 in execute_command (p=0x1b5cff "b", from_tty=1) at top.c:1268
#16 0xd7b00 in command_loop () at top.c:1365
#17 0xdf40c in main (argc=3, argv=0xeffff714) at main.c:635

__________________________________________________
Do You Yahoo!?
Send instant messages with Yahoo! Messenger.
http://im.yahoo.com/

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