Menu

#157 Floating point exception when running te

closed-fixed
libcurl (356)
8
2013-06-21
2002-02-07
Anonymous
No

Hi,

I encountered some Floating point exceptions while
running the tests.

The problem was division by zero in lib/progress.c.
A quick fix (likely not logically correct) is

Cmd : diff -C 3 lib/progress.c.orig lib/progress.c
*** lib/progress.c.orig Wed Oct 31 09:45:47 2001
--- lib/progress.c Wed Feb 6 14:35:57 2002
***************
*** 279,285 ****
--- 279,289 ----
/* Calculate the average speed the last
'countindex' seconds */
data->progress.current_speed =
(data->progress.speeder[nowindex]-
+ #if 0 /* divide by zero errors */

data->progress.speeder[checkindex])/((double)span_ms/1000);
+ #else
+
data->progress.speeder[checkindex])/(span_ms?((double)span_ms/1000):1.0);
+ #endif
}
else
/* the first second we use the main average */

Cmd : make test
[ -f test1 ] || ln -s ./test* .
srcdir=. /usr/bin/perl -I. ./runtests.pl -s -a
********* System characteristics ********
* curl 7.9.1 (i386-unknown-freebsd3.1)
* libcurl 7.9.1 (OpenSSL 0.9.6a)
* Host: cwl.bbn.com
* System: FreeBSD cwl.bbn.com 3.1-RELEASE FreeBSD
3.1-RELEASE #0: Mon Dec 11 23:30:53 EST 2000
root@cwl.bbn.com:/usr/src/sys/compile/CLynnPC i386
* Memory debugging: OFF
* HTTPS server: OFF
* FTPS server: OFF
* libcurl SSL: ON
*****************************************
Floating point exception - core dumped
test 1... error FAILED

...

44 tests out of 68 reported OK
These test cases failed: 1 2 3 4 5 6 11 12 13 14 16 17
22 26 27 34 36 37 47 103 104 108 200 202
6 tests were skipped due to restraints

(There were also two FTP timeouts ...

These test cases failed: 103 108
curl: (30) Timeout while waiting for server connect

)

Discussion

  • Daniel Stenberg

    Daniel Stenberg - 2002-02-08
    • labels: --> libcurl
    • priority: 5 --> 8
    • assigned_to: nobody --> bagder
    • status: open --> closed-fixed
     
MongoDB Logo MongoDB