Re: [Boost-bugs] [Boost C++ Libraries] #12049: Assertion failure from detached threads during shutdown

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #12049: Assertion failure from detached threads during shutdown
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2016-04-18 07:19:33


#12049: Assertion failure from detached threads during shutdown
-----------------------------------------+------------------------
  Reporter: Braden McDaniel <braden@…> | Owner: viboes
      Type: Bugs | Status: closed
 Milestone: Boost 1.61.0 | Component: thread
   Version: Boost 1.60.0 | Severity: Regression
Resolution: fixed | Keywords:
-----------------------------------------+------------------------

Comment (by blastrock):

 Hi,

 I wanted to investigate a bit on this bug, do you have a minimal example?
 I tried to produce one with the description of the bug and wrote this:

 {{{
 #include <boost/thread.hpp>
 #include <thread>
 #include <unistd.h>

 boost::thread_specific_ptr<int> p;

 int main()
 {
   std::thread th([]{ p.reset(new int); usleep(200000); });
   //th.join();
   th.detach();
   pthread_exit(0);
 }
 }}}


 But this program works fine on my Linux, even if I comment the
 pthread_exit or if I invert the reset() and the usleep() calls.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/12049#comment:5>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:20 UTC