FP exception, core dump in Python 1.5.2 (Tim's doing <grin>)

Fernando Pereira pereira at research.att.com
Thu Apr 29 22:58:58 EDT 1999


In article <mark.925274556 at declan>, Mark C Favas <mark at chem.uwa.edu.au>
wrote:

> [Tim Peters suggests some code to generate INFs and NANs]
> <snip> 
> [Mark tries it, and...]
> 
> On my platform, (DEC Alpha, Digital Unix 4.0D, Python 1.5.2) I get... a core
> dump! (exclamation because it's one of the few Python core dumps I've seen).
Unfortunately, the Alpha implementation of IEEE FP does not handle
overflow gracefully. With the default C compilation flags, the code
generated cannot recover from an overflow to stuff an Inf in the
result, so the only thing the OS can do is to kill the process.
Alternatively, with appropriate flags (can't remember them from the top
of my head, had to deal with this 6 months ago), the C compiler adds
machine instructions to allow recovery from FP exceptions, including
storing Inf as a result of overflow. Unfortunately, FP performance in
this mode is not nearly as good. None of the other machines I use (SGI,
Sun, Intel, Mac) have this problem. On the other hand, none of them
comes close to an Alpha in FP performance (with the dafault `fast'
compilation setting). Tradeoffs...

-- 
-- F




More information about the Python-list mailing list