cpr icon indicating copy to clipboard operation
cpr copied to clipboard

Enable thread sanitizer

Open COM8 opened this issue 5 years ago • 0 comments

It's currently not possible since all tests fail. This is caused by a false positive data race inside libcurl.

CurlHolder::CurlHolder() {
    curl_easy_init_mutex_.lock();
    handle = curl_easy_init(); // Thread sanitizer false positive
    curl_easy_init_mutex_.unlock();

    assert(handle);
}

Even adding the __attribute__((no_sanitize("thread"))) does not fix this.

#if defined(__has_feature)
#if __has_feature(thread_sanitizer)
__attribute__((no_sanitize("thread")))
#endif
#endif
CurlHolder::CurlHolder() {
    curl_easy_init_mutex_.lock();
    handle = curl_easy_init(); // Thread sanitizer false positive
    curl_easy_init_mutex_.unlock();

    assert(handle);
}

COM8 avatar Oct 01 '20 11:10 COM8