From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1185 invoked by alias); 2 Sep 2010 00:44:49 -0000 Received: (qmail 1134 invoked by uid 48); 2 Sep 2010 00:44:38 -0000 Date: Thu, 02 Sep 2010 00:44:00 -0000 Message-ID: <20100902004438.1133.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c++/45479] Exceptions not delivered properly after thread cancellation In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "pinskia at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2010-09/txt/msg00168.txt.bz2 ------- Comment #8 from pinskia at gcc dot gnu dot org 2010-09-02 00:44 ------- Doing: catch (int i) { Guard g(ioSync); cout << "Caught " << i << endl << flush; sched_yield(); pthread_testcancel(); } Fixes the issue. Note there is a blog entry about POSIX thread cancel and C++ exceptions by Uli somewhere. There was huge discussion on a mailing list about it too. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45479