cpr
cpr copied to clipboard
Enable thread sanitizer
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);
}