Re: [Boost-bugs] [Boost C++ Libraries] #7461: detail::win32::ReleaseSemaphore may be called with count_to_release equal to 0

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #7461: detail::win32::ReleaseSemaphore may be called with count_to_release equal to 0
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-10-11 17:25:49


#7461: detail::win32::ReleaseSemaphore may be called with count_to_release equal
to 0
-----------------------------------------------------+----------------------
  Reporter: Jesper Storm Bache <jsbache@…> | Owner: viboes
      Type: Bugs | Status: assigned
 Milestone: To Be Determined | Component: thread
   Version: Boost 1.51.0 | Severity: Problem
Resolution: | Keywords:
-----------------------------------------------------+----------------------

Comment (by jsbache@…):

 I apologize for the terseness. Here are a few detais.
 When I notice a zero count, the stack is:
         c4test.exe!boost::detail::basic_cv_list_entry::release(unsigned
 int count_to_release=0) Line 68
         c4test.exe!boost::detail::basic_cv_list_entry::release_waiters()
 Line 73
         c4test.exe!boost::detail::basic_condition_variable::notify_all()
 Line 285 + 0x1a bytes

 My conditional breakpoint (condition: "count_to_release == 0) is on the
 following line (before we modify notified)
 {{{
    void release(unsigned count_to_release)
    {
    --break-- notified=true;
 }}}

 When I hit this, code I have the following state of the local variables.
 Note that notified = true at this point in time,
 {{{
 it {px=0x0000000001dde7b0 }
         [ptr] 0x0000000001dd75b8 {px=0x0000000001dde7b0 }
         px 0x0000000001dde7b0
         semaphore {handle_to_manage=0x0000000000000100 }
         wake_sem {handle_to_manage=0x0000000000000184 }
         waiters 0
         notified true
         references 1

 this 0x00000000003dee28
         internal_mutex {...} boost::mutex
         total_count 0 long
         active_generation_count 0 unsigned int
         generations [2]({px=0x0000000001dde630
 },{px=0x0000000001dde7b0 })
         wake_sem {handle_to_manage=0x0000000000000198 }
 }}}

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