asyn-thrdd: drop pthread_cancel

Remove use of pthread_cancel in asnyc threaded resolving. While there
are system where this works, others might leak to resource leakage
(memory, files, etc.). The popular nsswitch is one example where resolve
code can be dragged in that is not prepared.

The overall promise and mechanism of pthread_cancel() is just too
brittle and the historcal design of getaddrinfo() continues to haunt us.

Fixes #18532
Reported-by: Javier Blazquez
Closes #18540
This commit is contained in:
Stefan Eissing 2025-09-13 15:25:53 +02:00 committed by Daniel Stenberg
parent f7cac7cc07
commit de3fc1d7ad
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
10 changed files with 16 additions and 217 deletions

View file

@ -112,7 +112,7 @@ test754 test755 test756 test757 test758 test759 test760 test761 test762 \
test763 \
\
test780 test781 test782 test783 test784 test785 test786 test787 test788 \
test789 test790 test791 test792 test793 test794 test795 test796 test797 \
test789 test790 test791 test792 test793 test794 test796 test797 \
\
test799 test800 test801 test802 test803 test804 test805 test806 test807 \
test808 test809 test810 test811 test812 test813 test814 test815 test816 \

View file

@ -1,36 +0,0 @@
<testcase>
<info>
<keywords>
DNS
</keywords>
</info>
# Client-side
<client>
<features>
http
Debug
!c-ares
!win32
</features>
<name>
Delayed resolve --connect-timeout check
</name>
<setenv>
CURL_DNS_DELAY_MS=5000
</setenv>
<command>
http://test.invalid -v --no-progress-meter --trace-config dns --connect-timeout 1 -w \%{time_total}
</command>
</client>
# Verify data after the test has been "shot"
<verify>
<errorcode>
28
</errorcode>
<postcheck>
%SRCDIR/libtest/test795.pl %LOGDIR/stdout%TESTNUMBER 2 >> %LOGDIR/stderr%TESTNUMBER
</postcheck>
</verify>
</testcase>