Date: Sun, 13 Dec 1998 00:09:30 +0100 (CET) From: Joakim.Henriksson@ludd.luth.se To: FreeBSD-gnats-submit@FreeBSD.ORG Subject: ports/9061: Problem with constant folding in jikes, with patch. Message-ID: <199812122309.AAA06477@rmstar.campus.luth.se>
next in thread | raw e-mail | index | archive | help
>Number: 9061 >Category: ports >Synopsis: Problem with constant folding in jikes, with patch. >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Dec 12 15:10:00 PST 1998 >Last-Modified: >Originator: Joakim Henriksson >Organization: University of Luleå >Release: FreeBSD 3.0-CURRENT i386 >Environment: Current. >Description: Jikes on certain programs causes SIGFPE since jikes folds constants in a bad way. Folding divisions by zero should not be done or if you want to do it you should use a constant for it not calculate it. Patch also submited to shields@watson.ibm.com . >How-To-Repeat: public class foo{ foo(){ double a = 1.0/0.0; } } >Fix: *** double.cpp.orig Thu Dec 3 16:08:56 1998 --- double.cpp Sat Dec 12 23:54:12 1998 *************** *** 125,136 **** IEEEdouble IEEEdouble::operator/ (IEEEdouble op) { ! return IEEEdouble(DoubleValue() / op.DoubleValue()); } IEEEdouble& IEEEdouble::operator/= (IEEEdouble op) { ! *this = *this / op; return *this; } --- 125,142 ---- IEEEdouble IEEEdouble::operator/ (IEEEdouble op) { ! if (op.DoubleValue() == 0.0) ! return HUGE_VAL; ! else ! return IEEEdouble(DoubleValue() / op.DoubleValue()); } IEEEdouble& IEEEdouble::operator/= (IEEEdouble op) { ! if (op.DoubleValue() == 0.0) ! *this = HUGE_VAL; ! else ! *this = *this / op; return *this; } >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199812122309.AAA06477>