Re: valgrind drd shows potential data race in curl_easy_init

Daniel Stenberg via curl-library <[email protected]> Thu, 20 Nov 2025 17:16:06 +0100 (CET)
Newsgroups gmane.comp.web.curl.library
Message-ID <[email protected]>
On Wed, 19 Nov 2025, Aman Grewal via curl-library wrote:

> I'm running my library under valgrind to try to find any bugs. I'm seeing
> this warning stemming from `curl_easy_init` when running drd.

I don't understand what that output means.

This is curl_easy_init code and as you can see, there is a lock for the part 
that is not thread-safe:

https://github.com/curl/curl/blob/7e8f36bf8e56e632e4f8be54b584f758e3aaa086/lib/easy.c#L349-L376

This lock has existed like this for a while.

-- 

  / daniel.haxx.se || https://rock-solid.curl.dev
-- 
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html