bug 22836 : atomics in shared_ptr (ThreadSanitizer)

Howard Hinnant howard.hinnant at gmail.com
Wed Mar 11 08:49:39 PDT 2015


On Mar 11, 2015, at 11:38 AM, Oleg Smolsky <oleg at smolsky.net> wrote:

> On 2015-03-10 15:31, Howard Hinnant wrote:
>> On Mar 7, 2015, at 11:06 PM, Oleg Smolsky <oleg at smolsky.net> wrote:
>> 
>>> Hi there, I reported a TSan issue that resulted in the following bug report against libc++:
>>>     http://llvm.org/bugs/show_bug.cgi?id=22836
>>> 
>>> Could you folks take a look at the following (intuitive) patch please?
>>>     http://reviews.llvm.org/D8147
>>> 
>>> Thanks!
>>> Oleg.
>> Can the increment be relaxed?
>> 
>> http://stackoverflow.com/q/28199212/576911
>> 
>> 
> Hi Howard, my understanding is that the increment path can become:
> 
>    __shared_owners_.fetch_add(1, std::memory_order_acquire);
> 
> BTW, does that make any difference on x86-64?

My question was asked in ignorance except that I knew the SO question existed, and I’ve watched the link it has.  I haven’t investigated my question at all, and don’t know the answer, sorry.

Howard





More information about the cfe-commits mailing list