[Patches] [ python-Patches-645382 ] Don't FPE on FreeBSD...
SourceForge.net
noreply@sourceforge.net
Wed, 12 Feb 2003 19:30:51 -0800
Patches item #645382, was opened at 2002-11-28 13:51
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=645382&group_id=5470
Category: Core (C code)
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Ben Laurie (benl)
Assigned to: Nobody/Anonymous (nobody)
Summary: Don't FPE on FreeBSD...
Initial Comment:
--- Python-2.2.2/Objects/floatobject.c Sun May 12
17:20:38 2002
+++ Python-2.2.2-ben/Objects/floatobject.c Thu Nov
28 18:25:04 2002
@@ -645,7 +645,7 @@
long aslong; /* (long)wholepart */
(void)modf(x, &wholepart);
-#ifdef RISCOS
+#if defined(RISCOS) || defined(__FreeBSD__)
/* conversion from floating to integral type
would raise exception */
if (wholepart>LONG_MAX || wholepart<LONG_MIN) {
PyErr_SetString(PyExc_OverflowError,
"float too large to convert");
----------------------------------------------------------------------
>Comment By: Neal Norwitz (nnorwitz)
Date: 2003-02-12 22:30
Message:
Logged In: YES
user_id=33168
Ben it's not clear to me if this should be applied to 2.3
and/or 2.2.2. Can you clarify what the problem is and which
version(s) of FreeBSD have the problem. I tested the
current CVS version on FreeBSD 4.7 (in the SF compile farm)
and did not have any unexpected errors.
Can you add a patch with tests too?
----------------------------------------------------------------------
Comment By: Ben Laurie (benl)
Date: 2002-11-30 18:03
Message:
Logged In: YES
user_id=14333
In current CVS the problem is fixed, but others have been
introduced. The enclosed patch fixes the FPE problems found
so far.
----------------------------------------------------------------------
Comment By: Tim Peters (tim_one)
Date: 2002-11-29 01:31
Message:
Logged In: YES
user_id=31435
Please try current CVS and see whether the problem is
already fixed there.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=645382&group_id=5470