Boost logo

Boost :

Subject: Re: [boost] [thread] Testing with Sanitisers (ASAN, TSAN, MSAN)
From: Ben Pope (benpope81_at_[hidden])
Date: 2015-03-13 04:08:22


On Friday, March 13, 2015 04:01 PM, Ben Pope wrote:
> On Friday, March 13, 2015 02:54 PM, Vicente J. Botet Escriba wrote:
>> Le 13/03/15 07:49, Vicente J. Botet Escriba a écrit :
>>
>> Other report this issue
>>
>> WARNING: ThreadSanitizer: data race (pid=4677)
>> ....
>>
>> Location is global 'std::__1::cout' of size 160 at 0x7f6d813c1b40
>> (libc++.so.1+0x0000002b8bd8)
>>
>>
>> See the full report here [1].
>>
>> The test is using std::cout in a multi-threaded env.
>>
>> Is this telling that the standard library has a data race?
>
> std::cout isn't thread safe, is it?

Oh, I just checked... There shouldn't be a race, but the output may be
garbled, which messes up the boost test log files (so you need to
serialise access to BOOST_CHECK anyway).

I'm not currently linking the executables to a sanitised version of
libc++, I'm not sure if that affects the reporting of the results, but
I'll reduce it and confirm with clang dev list.

Ben


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk