Displaying 3 results from an estimated 3 matches for "__tsan_release_merge".
2016 Sep 02
2
call_once and TSan
...still see a false positive where one thread has already run user code, and another thread already sees that call_once is finished, but the acquire has no release to pair with.
>
>
>
> Will then the following work?
>
> INTERCEPTOR(call_once, o) {
> REAL(call_once)(o);
> __tsan_release_merge(o);
> __tsan_acquire(o);
> }
Still racy. Suppose thread A is still inside REAL(call_once), but already after it has run user code and updated "o" to ~0. Thread B load-acquires "o", finds ~0, assumes it's fully initialized, keeps going, but user code stores hasn'...
2016 Sep 02
2
call_once and TSan
..._wrapper(...) {
orig_func(orig_arg);
__tsan_release(flag);
}
INTERCEPTOR(call_once, o, func, arg) {
REAL(call_once)(flag, ..., call_once_callback_wrapper);
}
Kuba
> On 2 Sep 2016, at 13:42, Dmitry Vyukov <dvyukov at google.com> wrote:
>
> INTERCEPTOR(call_once, o) {
> __tsan_release_merge(o);
> REAL(call_once)(o);
> __tsan_acquire(o);
> }
>
> ?
>
>
> On Fri, Sep 2, 2016 at 12:16 PM, Kuba Brecka <kuba.brecka at gmail.com> wrote:
>>
>>> On 2 Sep 2016, at 12:11, Dmitry Vyukov <dvyukov at google.com> wrote:
>>>
>>...
2016 Sep 02
2
call_once and TSan
> On 2 Sep 2016, at 11:18, Dmitry Vyukov via llvm-dev <llvm-dev at lists.llvm.org> wrote:
>
> On Thu, Sep 1, 2016 at 2:30 PM, Kuba Brecka <kuba.brecka at gmail.com> wrote:
>> Hi,
>>
>> I'm trying to write a TSan interceptor for the C++11 call_once function. There are currently false positive reports, because the inner __call_once function is located in