NetBSD Problem Report #6805
Received: (qmail 27635 invoked from network); 14 Jan 1999 01:02:04 -0000
Message-Id: <199901140048.TAA12108@mcmahill.ne.mediaone.net>
Date: Wed, 13 Jan 1999 19:48:24 -0500 (EST)
From: mcmahill@mtl.mit.edu
Reply-To: mcmahill@mtl.mit.edu
To: gnats-bugs@gnats.netbsd.org
Subject: fpsetmask() broken on alpha
X-Send-Pr-Version: 3.95
>Number: 6805
>Category: port-alpha
>Synopsis: fpsetmask() dumps core on alpha
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: port-alpha-maintainer
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Jan 13 17:05:01 +0000 1999
>Closed-Date: Tue Nov 06 01:54:18 +0000 2001
>Last-Modified: Tue Nov 06 01:54:18 +0000 2001
>Originator: Dan McMahill
>Release: 1.3I
>Organization:
>Environment:
NetBSD/alpha-1.3I
>Description:
fpsetmask() (from <ieeefp.h>) dumps core everytime on alpha's
>How-To-Repeat:
The following program always dumps core on fpsetmask().
#include <stdio.h>
#include <ieeefp.h>
int main()
{
printf("About to call fpsetmask(0x00)\n");
fpsetmask(0x00);
printf("Returned from fpsetmask(0x00)\n");
exit(0);
}
% gcc -o tst tst.c
% ./tst
About to call fpsetmask(0x00)
Abort (core dumped)
>Fix:
I unfortunately don't know how to fix it and also have no workaround.
>Release-Note:
>Audit-Trail:
From: Dan McMahill <mcmahill@mtl.mit.edu>
To: gnats-bugs@netbsd.org
Cc: Subject: port-alpha/6805
Date: Wed, 27 Jan 1999 21:12:07 -0500 (EST)
A related thing which crashes on NetBSD/alpha-1.3I is:
#include <stdio.h>
#include <math.h>
#ifdef notdef
#include <ieeefp.h>
#endif
int main(int argc, char *argv[])
{
if(argc>1)
{
printf("Calling fpsetmask(0)\n");
#ifdef notdef
fpsetmask(0);
#endif
}
printf("starting math which causes floating point exceptions...\n");
printf("Trying 5.0/0.0 = ");
printf("%g\n",5.0/0.0);
printf("Trying 0.0/0.0 = ");
printf("%g\n",0.0/0.0);
printf("Trying pow(1000.3,1000.3) = ");
printf("%g\n",pow(1000.3,1000.3));
}
Then try
cc -o tst tst.c -lm
./tst
any of the 3 math operations, or removing the #ifdef notdef's causes core
dumps.
State-Changed-From-To: open->feedback
State-Changed-By: thorpej
State-Changed-When: Fri May 4 10:26:26 PDT 2001
State-Changed-Why:
FP completion code has been added to -current. Can you confirm
that the problem is fixed?
State-Changed-From-To: feedback->closed
State-Changed-By: dmcmahill
State-Changed-When: Mon Nov 5 17:53:18 PST 2001
State-Changed-Why:
new FPC code seems to work and this crash is gone. Thanks!.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.