This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
asynchronous-exceptions handling
- To: gcc-bugs at gcc dot gnu dot org
- Subject: asynchronous-exceptions handling
- From: "Rabin Shahav (r53653)" <r53653 at email dot sps dot mot dot com>
- Date: Mon, 12 Jun 2000 10:26:45 +0300
// The -fasynchronous-exceptions flags is not
working !
// here is a sample of an exception thrown from a
signal
// handler. This exception terminates the program
although
// it is a wrapped with "catch" statement.
// Note: this bug doesn't occur on gcc-2.7.x!!!
// compile with g++ -v -g -fasynchronous-exceptions
a.cc
// on sun ultra1 running solaris 5.7
class DphError {
int errorNum;
};
#include <fstream.h>
#include <signal.h>
static void dphErrHandler(int intruptNumber)
{
cerr<<"Received signal\n";
throw DphError();
}
int my(const char * val)
{
//throw DphError();
cout<<strlen(val)<<endl;
}
int main(int argc, char *argv[]) {
signal(SIGSEGV,dphErrHandler);
try {
my(NULL);
} catch (...) {
cout << "catched"<<endl;
}
}
begin:vcard
n:Shahav;Rabin
tel;work:+972-9-9522659
x-mozilla-html:TRUE
org:Motorola Semiconductor Israel;Cad
adr:;;Shenkar 1;Hertzelia;;;Israel
version:2.1
email;internet:Rabin.Shahav@motorola.com
x-mozilla-cpt:;28464
fn:Rabin Shahav
end:vcard