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]

Re: multithreaded EH is still broken on Linux/Alpha and other platforms


The Linux/x86 EH bug has nothing to do with thread.

# c++ s.cc
# a.out
A
~A
Caught system exception.
~A
zsh: 29100 abort      ./a.out

BTW, CC 4.2 on Solaris does it right.


-- 
H.J. Lu (hjl@gnu.org)
---
#include <iostream.h>
#include <stdlib.h>

static int x = 0;

class A {
public:
  A() {
    cerr << "A" << endl;
    x++;
  }
  ~A() {
    cerr << "~A" << endl;
    x--;
  }
};

main (int argc, char **argv)
{
  try {
    throw A();
  }
  catch (...) {
    cerr << "Caught system exception." << endl;
  }
  if (x != 0)
    abort ();
  return 0;
}


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