Hi,

I am getting floating point exception when doing emulation tests with ns2 
version 2.33 on a Fedora 8 x86 machine. After debugging, I traced the problem 
to the "width_" field of CalendarScheduler class, which is extended by 
RealTimeScheduler that I use during emulation (nse). width_ field takes very 
large values like 7.8181674907623326e+307 on one test and 
3.2030480282798705e+307 on another test, which causes overflow and therefore 
SIGFPE. Below are the debug outputs from two separate tests:

test1:

TapAgent(_o70): linked sock 7 as READABLE
TapAgent(_o76): linked sock 10 as READABLE
17:57:31  Started ns2 for test_0042

Program received signal SIGFPE, Arithmetic exception.
0x0818a993 in CalendarScheduler::reinit (this=0xa0ed020, nbuck=8,
    bwidth=7.8181674907623326e+307, start=82.553562974804962)
    at common/scheduler.cc:859
859             diff1_ = diff0_ + bwidth;


test2:

TapAgent(_o70): linked sock 7 as READABLE
TapAgent(_o76): linked sock 10 as READABLE
18:40:22  Started ns2 for test_0042

Program received signal SIGFPE, Arithmetic exception.
0x0818a21d in CalendarScheduler::insert2 (this=0x9e67020, e=0x9e902f8)
    at common/scheduler.cc:668
668             int i = CALENDAR_HASH(e->time_);
(gdb) print e->time_
$1 = 100
(gdb) print width_
$2 = 3.2030480282798705e+307

Any comments?

Thanks

--
Burak

Reply via email to