Boost logo

Boost :

From: Jens Seidel (jensseidel_at_[hidden])
Date: 2008-06-24 10:37:56


I know that version 1 of John's logging library was never accepted and is
probably not wildly used anymore nevertheless I found a nasty bug in it.

It's strange but even after applying valgrind I found initially not the
reason (probably I just assumed John's code is OK and it's something else)
and it took some time until I resolved it.

OK, for all users of this lib here is the patch:

@@ -51,7 +51,7 @@
     mutex & operator = ( const mutex & Not_Implemented);
     mutex( const mutex & From);
- mutex() : m_mutex() {
+ mutex() : m_mutex(), m_count(0) {
         pthread_mutexattr_t attr;
         int res = pthread_mutexattr_init(&attr);
         assert(res == 0);

I haven't checked whether this occurs in version 2 as well.


Boost list run by bdawes at, gregod at, cpdaniel at, john at