
21 Jan
2015
21 Jan
'15
3:44 p.m.
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.