This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/45479] Exceptions not delivered properly after thread cancellation
- From: "redi at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 10 Sep 2010 09:55:09 -0000
- Subject: [Bug c++/45479] Exceptions not delivered properly after thread cancellation
- References: <bug-45479-19472@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #16 from redi at gcc dot gnu dot org 2010-09-10 09:55 -------
There certainly is a race condition: there's no ordering between pthread_cancel
and pthread_testcancel so the main thread can run f2(50) before thread2 calls
pthread_cancel, which is why you see it sometimes run beyond the cancellation
point.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45479