This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/9186] [i686] async exception from a signal handler not working as before
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 18 Nov 2003 09:55:31 -0000
- Subject: [Bug target/9186] [i686] async exception from a signal handler not working as before
- References: <20030106054602.9186.rabins@msil.sps.mot.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-11-18 09:55 -------
One problem is that in the glibc headers strcpy is marked as not throwing which is not
true but change the code to:
////b.cc
#include <iostream>
#include <signal.h>
static void MyErrHandler(int intruptNumber)
{
std::cerr<<"seg fault signal, throwing 1...\n";
throw 1;
}
int main (int argc, char **argv)
{
std::cerr<<"hellow world\n";
signal(SIGSEGV,MyErrHandler);
try {
int *a = NULL;
*a = 1;
//strcpy(NULL,"blabla");
} catch (...) {
std::cerr<<"cauth some exception\n";
}
std::cerr<<"Normal finish\n";
return 0;
}
// end of b.cc
The problem still exists, this must work somehow as it works in Java on i686-pc-linux-
gnu.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9186