Re: [Boost-bugs] [Boost C++ Libraries] #3585: Boost::thread + valgrind/drd possible false positive

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #3585: Boost::thread + valgrind/drd possible false positive
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-12-11 02:58:04


#3585: Boost::thread + valgrind/drd possible false positive
-----------------------------------------------------+----------------------
  Reporter: Mihail Strashun <m.strashun@…> | Owner: anthonyw
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: thread
   Version: Boost 1.42.0 | Severity: Problem
Resolution: | Keywords: thread, drd, valgrind
-----------------------------------------------------+----------------------

Comment (by viboes):

 In boost/thread

 {{{
 grep -rHn current_cond * | grep -v svn
 pthread/thread_data.hpp:60: pthread_cond_t* current_cond;
 pthread/thread_data.hpp:67: current_cond(0)
 pthread/thread_data.hpp:104:
 thread_info->current_cond=cond;
 pthread/thread_data.hpp:119:
 thread_info->current_cond=NULL;

 }}}

 Note that in line 104 current_cond stores an external condition that comes
 from the interruption_checker. It is the user of this external condition
 that will do the wait, isn't it?

 {{{
 grep -rHn interruption_checker * | grep -v svn
 pthread/condition_variable.hpp:53: detail::interruption_checker
 check_for_interruption(&internal_mutex,&cond);
 pthread/condition_variable.hpp:71: detail::interruption_checker
 check_for_interruption(&internal_mutex,&cond);
 pthread/condition_variable.hpp:135:
 detail::interruption_checker
 check_for_interruption(&internal_mutex,&cond);
 pthread/condition_variable.hpp:159:
 detail::interruption_checker
 check_for_interruption(&internal_mutex,&cond);
 }}}

 So IMO the current_cond can not be removed.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/3585#comment:7>
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:08 UTC