From: Archeron (archeron_at_wavefire.com)
Date: Thu May 26 2005 - 23:45:53 CEST
From: Archeron <archeron@wavefire.com> Message-Id: <20050526214553.C96E527302E7@einstein.suse.de> Date: Thu, 26 May 2005 23:45:53 +0200 (CEST) Subject: [taskjuggler-devel] Divide by zero (SIGFPE) in ktjview
Hello Folks,
Trying to get ktjview running under FreeBSD 4.11/KDE 3.4.0.
Got it to compile/install and can run ktjview but as soon as I click on the gantt chart section of the GUI, it crashes with SIGFPE. The culprit line is here:
Program received signal SIGFPE, Arithmetic exception.
0x2955ffbf in clocaltime (t=0xbfbff18c) at Utility.cpp:153
153 long index = *t % LTHASHTABSIZE;
(gdb) print *t
$1 = 529200
(gdb) print t
$2 = (time_t *) 0xbfbff18c
(gdb) print LTHASHTABSIZE
$3 = 0
The general context here is:
const struct tm*
clocaltime(const time_t* t)
{
long index = *t % LTHASHTABSIZE;
if (LtHashTab[index])
...
As we can see, it attempts to divide by zero when this LTHASHTABSIZE (static long) is zero. The problem is, as far as I can tell, this LTHASHTABSIZE is declared, but never initialized.
Maybe this is some goofy CPP thing or maybe it is a FreeBSD patch issue, but if it is never initialized and is always zero, this should barf all the time. Anyone got some insight here for me? If so, I will send the port maintainer a patch.
-Wade
-- To unsubscribe, email: taskjuggler-devel-unsubscribe@suse.com For additional commands, email: taskjuggler-devel-help@suse.com
This archive was generated by hypermail 2.1.7 : Fri May 27 2005 - 18:56:04 CEST