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]

target/9186: async exception from a signal handler not working as before


>Number:         9186
>Category:       target
>Synopsis:       async exception from a signal handler not working as before
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jan 06 05:46:02 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     rabins@msil.sps.mot.com
>Release:        3.2
>Organization:
>Environment:

>Description:
The asyn execption hanlding is not functianl in the 3.2.x
while it was functional on 2.9x.
Here is a smaple code
compile with:
/usr/local/egcs/3.2/bin/g++ -g -static -fnon-call-exceptions -fasynchronous-unwind-tables b.cc
or
 /usr/local/egcs/2.95.2/bin/g++ -static -fsjlj-exceptions  b.cc
////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 {
    strcpy(NULL,"blabla");
  } catch (...) {
    std::cerr<<"cauth some exception\n";
  }
  std::cerr<<"Normal finish\n";
  return 0;
}
// end of b.cc


/usr/local/egcs/3.2/bin/g++ -v
 Reading specs from /usr/local/egcs/3.2/lib/gcc-lib/i686-pc-linux-gnu/3.2/specs
 Configured with: ./configure --prefix=/usr/local/egcs/3.2
 Thread model: posix
 gcc version 3.2

 /usr/local/egcs/2.95.2/bin/g++ -v
 Reading specs from /usr/local/egcs/2.95.2/lib/gcc-lib/i686-pc-linux-gnu/2.95.2/specs
 gcc version 2.95.2 19991024 (release)

uname -a
 Linux pc524L 2.4.18-17.7.x #1 Tue Oct 8 13:33:14 EDT 2002 i686 unknown

uname -a
Linux pc524L 2.4.18-17.7.x #1 Tue Oct 8 13:33:14 EDT 2002 i686 unknown
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


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