Including thread.hpp causes coredump on AIX
#include <iostream> #include "Class1.h" #include <boost/thread/thread.hpp> main () { std::cout << "starting main()" << std::endl; Class1 c; c.noop(); std::cout << "exiting main() normally" << std::endl; } #include <iostream> #include "Class1.h" #include <boost/thread/thread.hpp> void Class1::noop () { std::cout << "entering Class1::noop()" << std::endl; try { std::cout << "..throwing exception" << std::endl; throw (2.1); } catch (...) { std::cout << "..caught exception in Class1.noop()" << std::endl; } std::cout << "..leaving Class1.noop()" << std::endl; return; } class Class1 { public: void noop(); };
Stupid question: but are you compiling with the reentrant IBM compiler, rather than the non-thread safe default one? Exception handling is one of those things that has to be set up correctly in a threaded environment or "bad things happen". John.
participants (2)
-
Chris Grayson -
John Maddock