Bug 162882 - gdb gets SIGSEGV in free when run under ddd
gdb gets SIGSEGV in free when run under ddd
Product: Fedora
Classification: Fedora
Component: gdb (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Alexandre Oliva
: 151410 165376 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2005-07-11 00:58 EDT by Michael Ubell
Modified: 2007-11-30 17:11 EST (History)
3 users (show)

See Also:
Fixed In Version: gdb-
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-09-26 06:18:55 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Untested patch for FC4 gdb- (545 bytes, patch)
2006-08-13 10:25 EDT, Jan Kratochvil
no flags Details | Diff

  None (edit)
Description Michael Ubell 2005-07-11 00:58:54 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-us) AppleWebKit/412 (KHTML, like Gecko) Safari/412

Description of problem:
Running gdb under ddd (either 3.3.10 or 3.3.11) gets segv when displaying code.
In this case I am running tclsh8.4 and dynamicly loading the BerkeleyDB tcl library.
It does not happen with gdb run standalone.  Strangely if you run gdb under
gdb under ddd it happens (must be some environment set by ddd?).

(gdb) file gdb
(no debugging symbols found)
(gdb) run tclsh8.4
(no debugging symbols found)
GNU gdb Red Hat Linux (
Copyright 2004 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 "i386-redhat-linux-gnu"...
(no debugging symbols found)
Using host libthread_db library "/lib/libthread_db.so.1".

Function "__db_loadme" not defined.
Function "__db_err" not defined.
(gdb) run
Starting program: /usr/bin/tclsh8.4 
Detaching after fork from child process 5636.
Detaching after fork from child process 5637.
Reading symbols from shared object read from target memory...(no debugging symbols found)...done.
Loaded system supplied DSO at 0xc66000
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
% source ../test/test.tcl
[Thread debugging using libthread_db enabled]
[New Thread -1208309280 (LWP 5636)]
Detaching after fork from child process 5639.
% ^C
Program received signal SIGINT, Interrupt.
[Switching to Thread -1208309280 (LWP 5636)]
0x00c66402 in __kernel_vsyscall ()
(gdb) where
#0  0x00c66402 in __kernel_vsyscall ()
#1  0x0049ed13 in __read_nocancel () from /lib/libc.so.6
#2  0x006aecde in Tcl_LappendObjCmd () from /usr/lib/libtcl8.4.so
#3  0x0067fbcf in Tcl_WriteRaw () from /usr/lib/libtcl8.4.so
#4  0x00681a81 in Tcl_ChannelWideSeekProc () from /usr/lib/libtcl8.4.so
#5  0x00681c8e in Tcl_GetsObj () from /usr/lib/libtcl8.4.so
#6  0x00691444 in Tcl_Main () from /usr/lib/libtcl8.4.so
#7  0x0804863c in main ()
(gdb) list __db_open

Program received signal SIGSEGV, Segmentation fault.
0x00446926 in free () from /lib/libc.so.6
(gdb) where
#0  0x00446926 in free () from /lib/libc.so.6
#1  0x080f4ca1 in find_line_pc_range ()
#2  0x080df3a4 in print_source_lines ()
#3  0x08084da2 in execute_command ()
#4  0x08112c94 in async_disable_stdin ()
#5  0x08113109 in async_disable_stdin ()
#6  0x081ede7d in rl_callback_read_char ()
#7  0x081125bb in delete_timer ()
#8  0x08111e6e in delete_file_handler ()
#9  0x08111952 in standard_macro_lookup ()
#10 0x08112197 in gdb_do_one_event ()
#11 0x08084834 in throw_exception ()
#12 0x080849ed in catch_errors ()
#13 0x080c2799 in _initialize_tui_hooks ()
#14 0x0810f953 in current_interp_command_loop ()
#15 0x0807b4fb in main ()

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Build berkeledb release with tcl support
2. ddd tclsh8.4
3. run
4. source ../test/test.tcl
5. Ctrl-C
6. list __db_open

Actual Results:  (gdb) list __db_open

Program received signal SIGSEGV, Segmentation fault.
0x00446926 in free () from /lib/libc.so.6

Expected Results:  list the routine

Additional info:
Comment 1 Michael Ubell 2005-07-11 17:38:47 EDT
I unpacked the gdb source RPM and compiled so that I could do a little debugging.
The problem does not happen in the verision of gdb built from the source distribution.
(I don't know if I should have applied all the patches that were in the distribution,
but I did not.)
Comment 2 Jan Kratochvil 2006-08-13 10:25:39 EDT
Created attachment 134098 [details]
Untested patch for FC4 gdb-

Although I was unable to directly reproduce the crash I stronly believe the
attached patch would fix it.
This bug was already fixed in FC5 and it is completely bugfixed/rewritten in
CVS so as FC4 went to fedoralegacy suggesting CLOSED-CURRENTRELEASE.
Comment 3 Jan Kratochvil 2006-08-13 12:39:22 EDT
This Bug was fixed by gdb-
Comment 4 Jan Kratochvil 2006-08-14 19:06:51 EDT
*** Bug 151410 has been marked as a duplicate of this bug. ***
Comment 5 Jan Kratochvil 2006-12-29 19:50:00 EST
*** Bug 165376 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.