Created attachment 1197277 [details] thread.cxx In the attached test case, if flush is called, it will fail with the message: terminate called after throwing an instance of 'std::runtime_error' The test case fails because of 'endl'. Other kinds of cancellation points work as expected.
Wrong component.
Simpler testcase, without STL, needs just libsupc++ and libpthread: #include <pthread.h> #include <unistd.h> namespace __cxxabiv1 { class __forced_unwind { virtual ~__forced_unwind() throw(); virtual void __pure_dummy() = 0; }; } int a; extern "C" void * fun (void *) { try { throw 1; } catch (int &) { try { char buf[10]; for (;;) read (4, buf, 0); } catch (__cxxabiv1::__forced_unwind &) { a = 5; throw; } } return NULL; } int main () { pthread_t thread; pthread_create (&thread, NULL, fun, NULL); pthread_cancel (thread); pthread_join (thread, NULL); }
All GCC versions affected.
Hello Can we get a update on likelyhood of this getting fixed in RHEL-6?
This BZ depends on the upstream bug being fixed. There hasn't been any progress, so I'm closing this BZ in favor of the upstream bug.