public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/6157: exceptions when cleaning up the stack
@ 2002-04-04 4:49 jason
0 siblings, 0 replies; 2+ messages in thread
From: jason @ 2002-04-04 4:49 UTC (permalink / raw)
To: gcc-bugs, gcc-prs, jason, mb, nobody
Synopsis: exceptions when cleaning up the stack
Responsible-Changed-From-To: unassigned->jason
Responsible-Changed-By: jason
Responsible-Changed-When: Thu Apr 4 04:49:23 2002
Responsible-Changed-Why:
x
State-Changed-From-To: open->closed
State-Changed-By: jason
State-Changed-When: Thu Apr 4 04:49:23 2002
State-Changed-Why:
This is not a bug; in that situation, the standard says that terminate() is called. The default behavior of terminate() is to call abort().
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=6157
^ permalink raw reply [flat|nested] 2+ messages in thread
* c++/6157: exceptions when cleaning up the stack
@ 2002-04-03 7:46 mb
0 siblings, 0 replies; 2+ messages in thread
From: mb @ 2002-04-03 7:46 UTC (permalink / raw)
To: gcc-gnats
>Number: 6157
>Category: c++
>Synopsis: exceptions when cleaning up the stack
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Apr 03 07:46:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator: Michael Becker
>Release: 3.0.3
>Organization:
Apis Software
>Environment:
System: Linux hercules.wesseling.apis.de 2.4.2-2 #1 Sun Apr 8 20:41:30 EDT 2001 i686 unknown
Architecture: i686
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: : (reconfigured) ./configure --enable-threads --enable-shared
>Description:
when an exception is thrown and the cleanup of the stack calls a destructor which also throws an exception i get a core
the same problem exists on Sun 2.7 gcc 2.95.3
>How-To-Repeat:
#include <stream.h>
class exc {
public:
exc() {
}
~exc() {
throw(333);
}
};
void sub()
{
exc ex;
cerr << "leaving sub" << endl;
throw("error");
}
int main()
{
try {
cerr << "calling sub ..." << endl;
sub();
}
catch (int err) {
cerr << "caught exception " << err << endl;
}
catch (const char * err) {
cerr << "caught exception " << err << endl;
}
catch (...) {
cerr << "caught unknown exception" << endl;
}
return 0;
}
>Fix:
don't use exceptions in destructors
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-04-04 12:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-04 4:49 c++/6157: exceptions when cleaning up the stack jason
-- strict thread matches above, loose matches on Subject: below --
2002-04-03 7:46 mb
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).