|
Boost : |
From: William E. Kempf (williamkempf_at_[hidden])
Date: 2002-07-12 15:55:28
----- Original Message -----
From: "Mark Rodgers" <mark.rodgers_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Friday, July 12, 2002 3:30 PM
Subject: [boost] Bug in Boost.Threads?
> Bill,
>
> We've had a problem with recursive_mutex on Solaris using GCC 2.95.3 using
> Boost 1.27.0. Occasionally we get the assert failing after the
> pthread_mutex_unlock on line 328 of recursive_mutex.cpp. On further
> investigation we've found that m_count seems to be getting decremented
below
> zero, so is ending up as 4 billion or so. Since the mutex in question is
> being used in a condition, we had a look at
>
> void recursive_mutex::do_unlock(cv_state& state)
>
> and it occurs to us that we should add
>
> m_count = 0;
>
> at the very end. Certainly that seems to have fixed the problem.
>
> Is this the right fix, and does something similar need to be applied in
> other places, eg. recursive_try_mutex?
>
> Mark
Thanks for the bug report. I'm a little swamped right now to actually look
at this immediately, but I'll research this over the weekend and let you
know.
Bill Kempf
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk