Daniel Stenberg <[email protected]> wrote: > 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?
I must admit I didn't go so deep. As I said I just tried a fast and dirty solution to test if I found the right place and understood the problem. In case of error, couldn't we somehow "detach" the thread instead of skipping the join()? Would it not be cleaner? -- Best regards. Woody from WiBu Systems AG. -- Unsubscribe: https://lists.haxx.se/listinfo/curl-library Etiquette: https://curl.haxx.se/mail/etiquette.html
