This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/9186] [i686] async exception from a signal handler not working as before


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]