[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Exceptions failing in libstdc++
From: |
red floyd |
Subject: |
Exceptions failing in libstdc++ |
Date: |
Mon, 21 Mar 2005 18:35:19 GMT |
User-agent: |
Mozilla Thunderbird 1.0 (Windows/20041206) |
G++ 3.2.3 (RedHat Enterprise Linux 3), x86
g++ --version returns:
g++ (GCC) 3.2.3 20030502 (Red Hat Linux 3.2.3-49)
Boiled down to essentials (and unfortunately, the minimun example won't
barf), I have:
class X {
public:
X() { /* ... */ };
// ... etc etc...
};
void f()
{
throw X();
}
void g()
{
// yada yada yada
try {
f();
}
catch (X&)
{
// do something
}
}
But when f() throws X as an exception, the program terminates,
and the libstdc++ code in __cxa_throw has a comment of:
// Some sort of unwinding error. Note that terminate is a handler.
__cxa_begin_catch (&header->unwindHeader);
std::terminate ();
The full-bore code in question works properly under VC7.1
GDB shows that the call to f() is occuring within a try/catch block,
which catches X&.
I'm compiling with -pthread -fexceptions
Any suggestions?
- Exceptions failing in libstdc++,
red floyd <=