From: Thomas Weise <tom@zaphod.wh9.tu-dresden.de>
To: egcs-bugs@cygnus.com
Cc: egcs@cygnus.com
Subject: EH unwind bug
Date: Tue, 25 Nov 1997 08:14:00 -0000 [thread overview]
Message-ID: <347B076D.6F1CEC10@zaphod.wh9.tu-dresden.de> (raw)
egcs-2.90.18, i486-pc-linux-gnulibc1, libc-5.4.39
After latest EH fixes I've finally managed to provide a testcase for the
EH bug I've already reported. Building and runnings attached program
gives following:
tom@hermes:/home/tom > g++ -v
Reading specs from
/usr/local/lib/gcc-lib/i486-pc-linux-gnulibc1/egcs-2.90.18/specs
gcc version egcs-2.90.18 971122 (gcc2-970802 experimental)
tom@hermes:/home/tom > g++ bug.cc
tom@hermes:/home/tom > a.out
stackObj::~stackObj()
stackObj::~stackObj()
IOT trap/Abort
This is, the local object's destructor is executed twice, before the
exception raiser's destructor and again after raising the exception.
I hope it comes in time and can be fixed before release.
Tom.
--
Thomas Weise, http://www.inf.tu-dresden.de/~tw4
Dresden University of Technology, Department of Computer Science
#include <iostream.h>
class myExc
{
};
class myExcRaiser
{
public:
~myExcRaiser();
};
class stackObj
{
public:
~stackObj() { cout << "stackObj::~stackObj()" << endl; };
};
myExcRaiser::~myExcRaiser()
{
throw myExc();
}
int test()
{
myExcRaiser rais;
stackObj obj;
return 0;
}
int main()
{
try {
test();
}
catch (myExc &)
{
//cout << "caught myExc as expected\n";
}
cout << "SUCCESS" << endl;
return 0;
}
next reply other threads:[~1997-11-25 8:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-11-25 8:14 Thomas Weise [this message]
1997-11-25 16:09 Thomas Weise
[not found] <347B307E.80D08A44.cygnus.egcs@zaphod.wh9.tu-dresden.de>
1997-11-26 6:10 ` Jason Merrill
[not found] <347B076D.6F1CEC10.cygnus.egcs.bugs@zaphod.wh9.tu-dresden.de>
[not found] ` <u9btz0cs9q.fsf@yorick.cygnus.com>
1997-12-02 9:56 ` Thomas Weise
1997-12-03 0:21 ` Jason Merrill
1997-12-03 5:46 ` Thomas Weise
1997-12-03 8:23 ` Jeffrey A Law
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=347B076D.6F1CEC10@zaphod.wh9.tu-dresden.de \
--to=tom@zaphod.wh9.tu-dresden.de \
--cc=egcs-bugs@cygnus.com \
--cc=egcs@cygnus.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).