[prev in list] [next in list] [prev in thread] [next in thread] 

List:       boost-bugs
Subject:    [Boost-bugs] [Boost C++ Libraries] #4484: bug in boost.thread on
From:       "Boost C++ Libraries" <noreply () lists ! boost ! org>
Date:       2010-07-29 7:09:22
Message-ID: 055.326b94f0a3adaa3bd4880b10f6f41816 () lists ! boost ! org
[Download RAW message or body]

#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.
_______________________________________________
Boost-bugs mailing list
Boost-bugs@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-bugs

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic