[PATCH] debuginfod, libdwfl: Initialize libcurl and dlopen debuginfod-client lazily

Mark Wielaard mark@klomp.org
Mon Apr 25 14:18:02 GMT 2022


On Fri, Apr 22, 2022 at 11:53:43PM +0200, Mark Wielaard wrote:
> We used to go out of our way to initialize libcurl early before any other
> thread/code was running. But this meant that we might pay startup cost,
> which under FIPS is significant, even for code that never uses libdebuginfod
> or TLS libcurl connections. Although curl_global_init itself isn't thread-safe
> we can use pthread_once to make sure we don't race against ourselves. This
> still means we might race against any application code that might use
> libcurl. But we can assume they will have called curl_global_init before
> calling dwfl_begin or debuginfod_begin.

Pushed.

Mark


More information about the Elfutils-devel mailing list