Re: gdselect alpha 2 (BUG Report)
"Shaya Potter" <spotter@ymail.yu.edu> writes:
> -----Original Message-----
> From: Tom Lees <tom@lpsg.demon.co.uk>
>
>
> >alpha 2 is released at http://www.lpsg.demon.co.uk/gdselect/
> I was trying to compile it, had a little problem with some includes on glib,
> which I overcame, but it seg faulted (or something like that, said glib
> caught it) in the initial run and setup, this is on a system that has latest
> gtk and glib, but is 100MB behind in other regards (been away from this
> machine for a month, running apt tonite on it).
This is due to a hard coded buffer size, see the end of this message:
Program received signal SIGSEGV, Segmentation fault.
0x4021a390 in ()
(gdb) bt
#0 0x4021a390 in ()
#1 0x8052460 in dpkgtag_mergetags (first=0x84919a0, t=0x83b2d08, flags=4,
proc=0x804b210 <process_update>) at pkg.c:375
#2 0x804b466 in DoProcess (a=1, s=1) at main.c:111
#3 0x804b869 in ReadAvailStatus () at main.c:189
#4 0x804bba3 in main (argc=1, argv=0xbffffd54) at main.c:237
(gdb) up
#1 0x8052460 in dpkgtag_mergetags (first=0x84919a0, t=0x83b2d08, flags=4,
proc=0x804b210 <process_update>) at pkg.c:375
375 if (!strcasecmp (p->name, p_name) &&
(gdb) p *p
$1 = {first_tags = 0x84a6778, name = 0x0, ver = 0x0,
descr_line1 = 0x84a68b8 "Guile-Gtk scheme interpreter (part of Gnome)",
descr = 0x84a6788 "Gnome is the \"GNU Network Object Model Environment\"\nIt is a project to build a complete, user-friendly desktop based entirely on free software.\nThis package contains the guile-gtk and gnomeg scheme in"...,
pri = dpkgpri_required, section = 0x0, source = 0x0, next = 0x84a68f0,
pkg_av = 0x0, pkg_stat = 0x0, deps = 0x0, dependents = 0x0, flags = 2,
data = 0x0, status = dpkgst_avail, selected = dpkgsel_unknown,
error = dpkgfl_ok}
(gdb) p p_name
$2 = 0x83b2d30 "libgdk-imlib1"
This happens when it's part of the way through processing the Status
file. I checked both status and available and the "gnome-guile"
entry has a "Package: gnome-guile" line in both files.
I downloaded the cvs snapshot and checked out alpha_1, and it crashes
at the same spot (p_name="libgdk-imlib1", p->name=0, package in p is
gnome-guile).
Just checked the entry for gnome-guile package. Noticed one
pecularity: the "Depends" line is 330 characters long.
I increased LINE_BUFSZ to 512 in tags.c, and the problem goes away.
A correct solution would be to fix tagfile_read_tags(). If there is
no "\n" terminating the string, then there is more to read. (Unless
EOF.)
Steve
dunham@cse.msu.edu
Reply to: