Date: Thu, 3 Jan 2008 03:29:48 GMT From: Stephen Hurd <shurd@sasktel.net> To: freebsd-gnats-submit@FreeBSD.org Subject: sparc64/119289: C++ throw/catch segfaults Message-ID: <200801030329.m033TmJc063018@www.freebsd.org> Resent-Message-ID: <200801030340.m033e12U090290@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 119289
>Category: sparc64
>Synopsis: C++ throw/catch segfaults
>Confidential: no
>Severity: serious
>Priority: low
>Responsible: freebsd-sparc64
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Thu Jan 03 03:40:01 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator: Stephen Hurd
>Release: 7.0-RC1
>Organization:
>Environment:
FreeBSD vorpal.hurd.local 7.0-RC1 FreeBSD 7.0-RC1 #0: Sun Dec 30 15:59:13 CST 2007 root@vorpal.bbsdev.local:/usr/obj/usr/src/sys/VORPAL sparc64
>Description:
Even the most simple trow/catch programs appear to crash in the __cxa_* functions. this appears to be at least part of the problem with OpenEXR.
>How-To-Repeat:
The following simple program crashes with the following backtrace:
(gdb) r
Starting program: /home/admin/a.out
start
Inside try block
Caught an exception -- value is: 99
Program received signal SIGSEGV, Segmentation fault.
0x0000000040396aac in __cxa_end_catch () from /usr/lib/libstdc++.so.6
(gdb) bt
#0 0x0000000040396aac in __cxa_end_catch () from /usr/lib/libstdc++.so.6
#1 0x0000000000100f38 in main () at test.cpp:13
// A simple exception handling example.
#include <iostream>
int main()
{
std::cout << "start\n";
try
{ // start a try block
std::cout << "Inside try block\n";
throw 99; // throw an error
std::cout << "This will not execute";
}
catch (int i)
{ // catch an error
std::cout << "Caught an exception -- value is: ";
std::cout << i << "\n";
}
std::cout << "end";
return 0;
}
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200801030329.m033TmJc063018>
