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: Tue, 18 Jan 2005 17:00:09 GMT
User-agent: KNode/0.8.1

John Max Skaller wrote:

> On Fri, 07 Jan 2005 23:00:10 +0000, Guy Harrison wrote:
>> 
>> 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;
>>  }
>> }
> 
> My mainline does the equivalent of the above.
> Doesn't help. I'm getting an unhandled exception,
> which calls terminate, so the catch(...) isn't relevant.

Hmm, the only other "obvious" situation where that can occur is a
double-exception. I only mention that in case...

> The error only occurs with -O3 -fomit-frame-pointer.
> So I think this is either this is either a bug in g++ or
> in the documentation for failing to specify the above
> combination doesn't work.

...the optimisation above is causing code generation to create that
situation. Nevertheless, it's apparent you have a bug with even "throw 42"
failing (you may even be able to follow the asm for that by hand). Perhaps
RedHat already know of it, or else you should submit a report.


reply via email to

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