[Boost-bugs] [Boost C++ Libraries] #4484: bug in boost.thread on freebsd 8.0

Subject: [Boost-bugs] [Boost C++ Libraries] #4484: bug in boost.thread on freebsd 8.0
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-07-29 07:09:22


#4484: bug in boost.thread on freebsd 8.0
------------------------------------+---------------------------------------
 Reporter: shubin_evgeniy@… | Owner: anthonyw
     Type: Bugs | Status: new
Milestone: Boost 1.44.0 | Component: thread
  Version: Boost 1.43.0 | Severity: Regression
 Keywords: thread freebsd |
------------------------------------+---------------------------------------
 I use boost1.43 on FreeBSD 8.0-RELEASE-p3 amd64, installed from ports.
 Here is a simple program that causes an assertion:

   Assertion failed:
 (!pthread_cond_wait(&cond,m.mutex()->native_handle())), function wait,
 file ./boost/thread/pthread/condition_variable.hpp, line 20.

 during execution.


 {{{
 #include <boost/thread.hpp>
 #include <cstdlib>

 using namespace std;

 void ThreadFun(int number)
 {
     sleep(5);
 }

 int main(int argc, char** argv)
 {
     if (argc > 1)
     {
         pid_t pid = fork();
         if (pid < 0)
         {
             return EXIT_FAILURE;
         }
         else if (pid > 0)
         {
             return EXIT_SUCCESS;
         }
     }
     boost::thread th1(boost::bind(&ThreadFun, 1));
     th1.join();
     return EXIT_SUCCESS;
 }
 }}}


 Error occurs only when I execute program with command line arguments(when
 the process forks)
 and only on freebsd 8.0 (on ubuntu 10.04 x64 and on freebsd 7.3 amd 64 it
 works correct).

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/4484>
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:04 UTC