On Mon, Jan 24, 2005 at 07:50:23AM -0500, Justin Pryzby wrote: > On Mon, Jan 24, 2005 at 10:14:39AM +0100, Goswin von Brederlow wrote: > > Hi, > > > > I wanted to track this bug but can't reproduce it on amd64: > Right. I've been working with the submitter without much success. I > asked for a shell account but that wasn't a possibility. Coredumps > all indicate a stack smash. And the strace indicates some problem > during initialization, before the call to init_X11. > > I've given the submitter debugging instructions, involving a gdb trap > on SIGFPE (though it will probably just show stack damage), and also > the old stick-a-printf-after-reading-everything-in. Maybe there are > uninitialized variables, or something.. I was looking for 2.4isms > (like /proc/meminfo), but there appear to be 2.6isms instead..
well, I can reproduce it in fact. trace attached : [madcoder hades] sudo swapon /dev/hda3 [madcoder hades] torsmo torsmo: drawing to subwindow of root window (180000d) torsmo: drawing to single buffer [...] [madcoder hades] sudo swapoff -a [madcoder hades] torsmo zsh: 19945 floating point exception torsmo [madcoder hades] uname -a Linux hades 2.6.10-ck1 #1 Sun Dec 26 23:39:17 CET 2004 i686 GNU/Linux I've looked into the sources, the patch is trivial, and is attached. -- ·O· Pierre Habouzit ··O OOO http://www.madism.org
--- torsmo.old.c 2005-03-02 12:16:00.398012799 +0100 +++ torsmo.c 2005-03-02 12:16:22.343340163 +0100 @@ -1126,7 +1126,8 @@ human_readable(cur->swapmax*1024, p); } OBJ(swapperc) { - snprintf(p, 255, "%*u", pad_percents, (cur->swap*100) / cur->swapmax); + snprintf(p, 255, "%*u", pad_percents, + cur->swapmax ? (cur->swap*100) / (cur->swapmax) : 0); } OBJ(swapbar) { new_bar(p, obj->data.pair.a, obj->data.pair.b,