Subject: port-alpha/12597: fp divide by zero causes SIGFPE on alpha
To: None <gnats-bugs@gnats.netbsd.org>
From: None <simonb@wasabisystems.com>
List: netbsd-bugs
Date: 04/10/2001 19:57:33
>Number:         12597
>Category:       port-alpha
>Synopsis:       fp divide by zero causes SIGFPE on alpha
>Confidential:   yes
>Severity:       serious
>Priority:       low
>Responsible:    port-alpha-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Apr 10 02:59:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Simon Burge
>Release:        NetBSD 1.5, NetBSD-current
>Organization:
Wasabi Systems
>Environment:
System: NetBSD thoreau.thistledown.com.au 1.5 NetBSD 1.5 (THOREAU)
#34: Fri Jan 12 12:03:49 EST 2001
simonb@thoreau.thistledown.com.au:/usr/obj/sys/arch/alpha/compile/THOREAU alpha


>Description:
	Floating point divide by zero on an alpha causes a floating
	point exception signal and results in a core dump.  A selection
	of other architectures tested (mips, arm32, i386, sparc64)
	don't core.  I can't find documented anywhere in NetBSD whether
	floating point exceptions are masked or not by default, but a
	quick web search shows that masking exceptions by default seems
	to be the norm on other operating systems.

>How-To-Repeat:

	thoreau:~ 3> cat fpdiv.c
	main()
	{
		double a, b, c;

		a = 0.0;
		b = 1.0;
		c = b / a;
		exit(0);
	}
	thoreau:~ 4> cc -o fpdiv fpdiv.c
	thoreau:~ 5> ./fpdiv 
	Floating exception (core dumped)
	Exit 136
	
>Fix:
	None given.

	There's some comments in sys/arch/alpha/alpha/sys_machdep.c that
	suggests this will be some not insignificant amount of work.
>Release-Note:
>Audit-Trail:
>Unformatted: