*BSD News Article 12072


Return to BSD News archive

Path: sserve!manuel.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!sun-barr!sh.wide!wnoc-tyo-news!news.u-tokyo.ac.jp!ecc-s401!g150267
From: g150267@kecc.ecc.u-tokyo.ac.jp (Tomoaki)
Newsgroups: comp.os.386bsd.bugs
Subject: Fatal signal 6
Message-ID: <1810@ecc-s401.secc.ecc.u-tokyo.ac.jp>
Date: 2 Mar 93 04:42:10 GMT
Sender: news@secc.ecc.u-tokyo.ac.jp
Organization: Educational Computer Centre,the Univ.of Tokyo,Japan.
Lines: 53
Nntp-Posting-Host: kintaro

the cc1 getting signal 6 seems a bug of sscanf()
and the conceerned routines.

the program enquire sais sscanf gets signal for
a great number.
this was copiled with gcc-2.3.3 and with a small change
bellow.  becouse the set/longjmp does not saves status of 
i387 .


the following is a part of the massage from enquire.

*** WARNING: sscanf caused a trap
    scanning: 1.7976931348623168e+308 format: %le

I do suppose the problem is the same point when cc1 gets
fatal signal 6.

so I'm *not* running 386bsd on ibm clone ,but a port of 386bsd
to pc98. Thus there might be some difference. but think that 
the problem is the same. 

               Tomoaki Nishiyama 
                     g150267@kecc.ecc.u-tokyo.ac.jp

*** enquire.c	Sun Feb 28 18:27:29 1993
--- enquire.c.orig	Thu Feb 25 10:01:39 1993
***************
*** 11,19 ****
     Copyright (c) 1988, 1989, 1990 Steven Pemberton, CWI, Amsterdam.
     All rights reserved.
  
-    Change by Tomoaki Nishiyama:
-    Clear exception flags when received a signal, Tomoaki Nishiyama,Feb 93.
- 
     Changes by Richard Stallman:
     Undef CHAR_BIT, etc., if defined in stdio.h, Richard Stallman, Aug 90.
     In EPROP, avoid a <= old if bad is set, Richard Stallman, May 91.
--- 11,16 ----
***************
*** 481,490 ****
  	jmp_buf lab;
  	Procedure overflow(sig) int sig; { /* what to do on over/underflow */
  		signal(sig, overflow);
- #ifdef i386
- 		asm("fclex");
- #endif    /*if we don't clear the exeption flag, an exeption will reported 
- 	    in time of the next floating point instruction */
  		longjmp(lab, 1);
  	}
  
--- 478,483 ----