This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Don't FPE on FreeBSD...
Type: Stage:
Components: Interpreter Core Versions: Python 2.3
process
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: Nosy List: benl, loewis, nnorwitz, tim.peters
Priority: normal Keywords: patch

Created on 2002-11-28 18:51 by benl, last changed 2022-04-10 16:05 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
python-fpe.patch benl, 2002-11-30 23:03 Patch for head to fix FPE problems under FreeBSD
Messages (6)
msg41822 - (view) Author: Ben Laurie (benl) Date: 2002-11-28 18:51
--- Python-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");
msg41823 - (view) Author: Tim Peters (tim.peters) * (Python committer) Date: 2002-11-29 06:31
Logged In: YES 
user_id=31435

Please try current CVS and see whether the problem is 
already fixed there.
msg41824 - (view) Author: Ben Laurie (benl) Date: 2002-11-30 23:03
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.

msg41825 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2003-02-13 03:30
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?
msg41826 - (view) Author: Tim Peters (tim.peters) * (Python committer) Date: 2003-02-13 03:43
Logged In: YES 
user_id=31435

CVS Python later grew a single patch to python.c that 
turns off FreeBSD's non-standard exception behavior before 
Py_Main is called.  We don't want #ifdef ugliness spreading 
all over the core.  It only turns off one of FreeBSD's oddball 
behaviors, though, so without more info from the FP we 
can't know whether or not it address all the problems he 
saw.
msg41827 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2003-06-21 14:08
Logged In: YES 
user_id=21627

Since there has been no follow-up, I conclude that Ben is
happy with the current code as-is. Rejecting this patch.
History
Date User Action Args
2022-04-10 16:05:57adminsetgithub: 37547
2002-11-28 18:51:38benlcreate