debug container mutex association

Jonathan Wakely jwakely@redhat.com
Tue Sep 27 15:29:00 GMT 2016


On 20/09/16 09:53 +0100, Jonathan Wakely wrote:
>On 19/09/16 21:56 +0200, François Dumont wrote:
>>Hi
>>
>>   Following our conversation here is a much simpler patch. I just 
>>consider that all debug containers will have the same alignment.
>>
>>   Even if I submit this patch as a whole I will commit into pieces, 
>>at least one for the pure cleanup parts and one for the debug.cc 
>>change.
>>
>>   Among those changes there is:
>>-       __gnu_cxx::__scoped_lock(this->_M_get_mutex());
>>+       __gnu_cxx::__scoped_lock __l(this->_M_get_mutex());
>>
>>   I would appreciate if you could tell me what was happening with 
>>the initial expression. I don't understand why it is compiling. I 
>>even tried the same in debug.cc and started having compilation 
>>errors.
>
>It creates a temporary __scoped_lock, which immediately goes out of
>scope and unlocks the mutex again. This should be fixed on the gcc-5
>and gcc-6 branches too.

I'm committing this to the gcc-5 and gcc-6 branches.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.txt
Type: text/x-patch
Size: 822 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20160927/e387cdee/attachment.bin>


More information about the Libstdc++ mailing list