c++/6786: throwing expection on Sparc V9 causes segv
dominik.strasser@infineon.com
dominik.strasser@infineon.com
Thu May 23 08:36:00 GMT 2002
>Number: 6786
>Category: c++
>Synopsis: throwing expection on Sparc V9 causes segv
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu May 23 08:36:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: dominik.strasser@infineon.com
>Release: unknown-1.0
>Organization:
>Environment:
SunOS m4 5.7 Generic_106541-17 sun4u sparc SUNW,Ultra-80
GCC 3.1
>Description:
The attached file causes a segv if compiled with
g++ -m64 exc.C.
The shared libs look OK:
ldd a.out
libstdc++.so.4 => /sw/gcc3/lib/sparcv9/libstdc++.so.4
libm.so.1 => /usr/lib/64/libm.so.1
libgcc_s.so.1 => /sw/gcc3/lib/sparcv9/libgcc_s.so.1
libc.so.1 => /usr/lib/64/libc.so.1
libdl.so.1 => /usr/lib/64/libdl.so.1
/usr/platform/SUNW,Ultra-80/lib/sparcv9/libc_psr.so.1
>How-To-Repeat:
Just compile & run.
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: text/plain; name="exc.C"
Content-Disposition: inline; filename="exc.C"
#include <exception>
#include <iostream>
using namespace std;
struct A
{
struct B : std::exception
{
B() {}
};
void foo() {
throw B();
}
};
int main()
{
try
{
A a;
a.foo();
}
catch (const std::exception& e)
{
cerr << e.what() << endl;
return 1;
}
catch(...)
{
return 1;
}
return 0;
}
More information about the Gcc-bugs
mailing list