*BSD News Article 12169


Return to BSD News archive

Xref: sserve comp.os.386bsd.bugs:83 comp.unix.bsd:11603
Path: sserve!manuel.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!agate!howland.reston.ans.net!bogus.sura.net!jhunix.hcf.jhu.edu!jhunix.hcf.jhu.edu!not-for-mail
From: philippe@jhunix.hcf.jhu.edu (Philippe Pouliquen)
Newsgroups: comp.os.386bsd.bugs,comp.unix.bsd
Subject: Re: Patch to fix signal 6 aborts (HUGE values are too huge)
Date: 3 Mar 1993 16:41:44 -0500
Organization: Homewood Academic Computing, Johns Hopkins University, Baltimore, Md, USA
Lines: 7
Sender: philippe@zeus.ece.jhu.edu
Message-ID: <1n38moINNn4o@jhunix.hcf.jhu.edu>
References: <C2Mutx.LKq@sugar.neosoft.com> <C33s1p.8At@unix.portal.com>
NNTP-Posting-Host: jhunix.hcf.jhu.edu

I encountered the same 'signal 6' abort while writing my own version
of 'strtod.c'. The signal occured when I used HUGE_VAL which is defined
in float.h as 1e500. I changed my code to use the i387 encoding of Inf
and had no more trouble. But to address the problem correctly, I would
look in the scanf code that gcc uses: there are some HUGE encodings on
the i387 that cause signals, and some that don't.