help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: exception crash


From: Guy Harrison
Subject: Re: exception crash
Date: Fri, 07 Jan 2005 23:00:10 GMT
User-agent: KNode/0.7.7

John Max Skaller wrote:

> On Mon, 03 Jan 2005 13:35:08 +0200, Attila Feher wrote:
> 
>> John Max Skaller wrote:
>>> Using: g++ (GCC) 3.2.2 20030222 (Red Hat Linux 3.2.2-5)
>>> When throwing an exception:
>>>
>>> #0 0xffffe002 in ?? ()
>>> #1 0x42028a73 in abort () from /lib/tls/libc.so.6
>>> #2 0x400b0b57 in __cxa_call_unexpected () from /usr/lib/libstdc++.so.5
>>> #3 0x400b0ba4 in std::terminate() () from /usr/lib/libstdc++.so.5
>>> #4 0x400b0d16 in __cxa_throw () from /usr/lib/libstdc++.so.5
>>> #5 0x0805ffd3 in xbase(char const*) ()
>>>
>>> in a program compiled with -O3 -fomit-frame-pointer.
>>> Without those options the program works.
>> 
>> Have you tried creating the smallest possible code which still has the
>> problem?
> 
> Briefly I, but my efforts failed. I'm not the developer of
> the code, the developer said it is possible there is a bug
> exposed by the compiler options.
> 
> The confusing thing is I get almost the same backtrack
> in this one liner:
> 
> int main() { throw 42; }
> 
> indicating an uncaught exception. The application mainline
> is a subroutine wrapped in a try/catch for the exception
> xbase function throws ..

Don't quite follow you there. If what follows doesn't help please elaborate
with code.
 
> BTW: the error is known and expected, it should
> print a diagnostic and terminate gracefully, but
> aborts instead. The same behaviour occurs for all
> errors.

int
main(/*...*/)
{
 try {
 return Main();
 }
 //other catches
 catch (...) {
 std::cerr << "*** UNHANDLED EXCEPTION ***\n";
 return EXIT_FAILURE;
 }
}



reply via email to

[Prev in Thread] Current Thread [Next in Thread]