NetBSD Problem Report #26599

From version=2.63
Received: (qmail 8703 invoked by uid 605); 9 Aug 2004 04:01:46 -0000
Message-Id: <20040809040132.7745831120@basha.sarasarado.org>
Date: Mon,  9 Aug 2004 13:01:32 +0900 (JST)
From: hatano@sarasarado.org
Sender: gnats-bugs-owner@NetBSD.org
Reply-To: hatano@sarasarado.org
To: gnats-bugs@gnats.NetBSD.org
Subject: zero division throw SIGTRAP
X-Send-Pr-Version: 3.95

>Number:         26599
>Category:       port-cobalt
>Synopsis:       zero division throw SIGTRAP
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    port-cobalt-maintainer
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Aug 09 04:02:01 +0000 2004
>Closed-Date:    Wed Oct 20 05:45:43 +0000 2004
>Last-Modified:  Wed Oct 20 05:45:43 +0000 2004
>Originator:     HATANO Hiromichi
>Release:        NetBSD 2.0_BETA
>Organization:
>Environment:
System: NetBSD basha.sarasarado.org 2.0_BETA NetBSD 2.0_BETA (COBALT) #0: Wed Aug 4 09:14:09 JST 2004 root@basha.sarasarado.org:/usr/src/sys/arch/cobalt/compile/COBALT cobalt
Architecture: mipsel
Machine: cobalt
>Description:
zero division operation throw SIGTRAP
>How-To-Repeat:
% cat > a.c
main() {
int a,b,c;

b=100; c=0;
a=b/c;
return a;
}
% gcc a.c
% ./a.out
Trace/BPT trap(core dumped)
>Fix:
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: soren 
State-Changed-When: Wed Oct 20 05:45:21 UTC 2004 
State-Changed-Why:  
The MIPS hardware does not raise an exception on division by zero, so the 
compiler has to explicitly check for it and abort, which is what is happening 
here. 
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.