cURL / Mailing Lists / curl-users / Single Mail

curl-users

[ curl-Bugs-514377 ] Floating point exception when running te

From: <noreply_at_sourceforge.net>
Date: Thu, 07 Feb 2002 09:26:45 -0800

Bugs item #514377, was opened at 2002-02-07 09:26
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=100976&aid=514377&group_id=976

Category: None
Group: crash
Status: Open
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: Floating point exception when running te

Initial Comment:
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_at_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

)

----------------------------------------------------------------------

You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=100976&aid=514377&group_id=976
Received on 2002-02-07