Subject: bin/24842:
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <akua@mail.kerr1.com>
List: netbsd-bugs
Date: 03/18/2004 16:22:48
>Number:         24842
>Category:       bin
>Synopsis:       
>Confidential:   yes
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Mar 18 21:24:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     AKUA interactive media AG
>Release:        NetBSD 1.6ZK
>Organization:
	
>Environment:
	
	
System: NetBSD lion.akua.com 1.6ZK NetBSD 1.6ZK (AKUA-031101-$Revision: J (1.577) $) #13: Sun Feb 22 23:13:08 EST 2004 akua@lion.akua.com:/usr/src/sys/arch/i386/compile/AkuaJ i386
Architecture: i386
Machine: i386
>Description:
It seems to me something broke in -current from gcc 3.3.2 to 3.3.3.

When I build the maildrop 1.3.9 package and use it on a -current box, it
causes infinite deliveries because a throw 0 (in recipenode.C); is causing a
SIGABT to be generated instead of passing control up to the catch(...)  in
maildrop.C.


>How-To-Repeat:

Tested this with: test.c

#include        <cstdio>
#include        <string>

int main(int argc, char * argv[])
{
       puts("Hello");

       try
        {
               puts("Throwing");
               throw 0;
        }
       catch (...)
        {
               puts("Caught");
             _exit(0);
        }

       return 0;
}

============
First machine
============
leo/tmp$ g++ test.cp
leo/tmp$ ./a.out

Hello
Throwing
Caught

leo/tmp$ uname -v
NetBSD 1.6ZG (AKUA-031219-$Revision: I (1.6) $) #8: Sat Jan  3 18:47:44 EST
2004  root@leo/usr/src/sys/arch/i386/compile/AkuaI

leo/tmp$ gcc -v
Using built-in specs.
Configured with: /usr/src/tools/gcc/../../gnu/dist/gcc/configure
--enable-long-long --disable-multilib --enable-threads
--build=i386-unknown-netbsdelf --host=i386--netbsdelf
--target=i386--netbsdelf : (reconfigured)
/usr/src/tools/gcc/../../gnu/dist/gcc/configure --enable-long-long
--disable-multilib --enable-threads --build=i386-unknown-netbsdelf1.6W
--host=i386--netbsdelf --target=i386--netbsdelf
Thread model: posix
gcc version 3.3.2 (NetBSD nb1 20031026)

lion:/tmp$ g++ test.cp
lion:/tmp$ ./a.out

Hello
Throwing
Abort trap (core dumped)

lion:/tmp$ uname -v
NetBSD 1.6ZK (AKUA-031101-$Revision: J (1.577) $) #13: Sun Feb 22 23:13:08
EST 2004  akua@lion.akua.com:/usr/src/sys/arch/i386/compile/AkuaJ

lion:/tmp$ gcc -v
Using built-in specs.
Configured with:
/home/nick/work/netbsd/src/tools/gcc/../../gnu/dist/gcc/configure
--enable-long-long --disable-multilib --enable-threads --disable-symvers
--build=i386-unknown-netbsdelf --host=i386--netbsdelf
--target=i386--netbsdelf
Thread model: posix
gcc version 3.3.3 (NetBSD nb1 20040301)

lion:/tmp$ gdb a.out
GNU gdb 5.3nb1
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386--netbsdelf"...
(gdb) r
Starting program: /tmp/a.out
Hello
Throwing

Program received signal SIGABRT, Aborted.
0x48113d0f in kill () from /usr/lib/libc.so.12
>Fix:
	
>Release-Note:
>Audit-Trail:
>Unformatted:
 no
 gcc 3.3.3 broken on catching exception (found on maildrop signal 0x06)
 critical
 high
 sw-bug