curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: Name resolution timeout not respected, Curl_resolver_kill() hangs.

From: Daniel Stenberg via curl-library <curl-library_at_lists.haxx.se>
Date: Tue, 16 Nov 2021 11:19:35 +0100 (CET)

On Tue, 16 Nov 2021, Woody wrote:

> It was just a test and it worked, but obviously it raises more doubts than
> those it solves... :-)

Doesn't it confirm that this is exactly this issue? And your change has the
exact same properties that I mentioned: it skips waiting for the thread which
has gone awol and therefore this risks leaking memory.

But for example in the case of the curl command line tool which exits
immediately afterward, such a leak wouldn't matter. That thread join code was
once added just to remove such a memory leak risk when running tools that
check for them.

The only half-decent fix for this that I can think of is that we add an option
to the library that the application can set that allows it to return early.

Or can we do better?

-- 
  / daniel.haxx.se
  | Commercial curl support up to 24x7 is available!
  | Private help, bug fixes, support, ports, new features
  | https://curl.se/support.html
-- 
Unsubscribe: https://lists.haxx.se/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html
Received on 2021-11-16