Boost logo

Boost :

Subject: Re: [boost] clang-3.6 thread sanitizer complains on shared_ptroperations
From: Peter Dimov (lists_at_[hidden])
Date: 2015-01-21 10:44:43

Andrey Semashev wrote:
> This is not specific to Boost.SmartPtr. Any library that implements
> atomics, including Boost.Atomic and std::atomic, will likely be present in
> TSan reports. The problem is that TSan does not fully support C++ memory
> ordering arguments.

In this specific case, it looks like TSan completely ignores the asm blocks
and doesn't see the memory accesses there at all, which is why it reports a
race between use_count() and the destructor, while these are separated by at
least two decrements of the count.

That's why it would be interesting to see what it has to say about the
std::atomic case.

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