Re: curl_version_info() thread-safety

2022-09-25 Thread Ray Satiro via curl-library
On 9/24/2022 12:22 PM, Patrick Monnerat via curl-library wrote: I just noticed curl_version_info() is not thread-safe when compiled with multi-ssl backends because the HTTPS-proxy feature bit is computed at run-time and may change between calls. This is the case until the effective SSL backend

Re: curl_version_info() thread-safety

2022-09-25 Thread Daniel Stenberg via curl-library
On Sun, 25 Sep 2022, Patrick Monnerat wrote: main() {   const curl_version_info_data *vid;   vid = curl_version_info(CURLVERSION_NOW);   printf("%08X\n", vid->features);   curl_global_sslset(CURLSSLBACKEND_OPENSSL, NULL, NULL);   curl_version_info(CURLVERSION_NOW);   printf("%08X\n", vid->featu

Re: curl_version_info() thread-safety

2022-09-25 Thread Patrick Monnerat via curl-library
On 9/25/22 10:30, Daniel Stenberg wrote: On Sun, 25 Sep 2022, Patrick Monnerat wrote: main() {   const curl_version_info_data *vid;   vid = curl_version_info(CURLVERSION_NOW);   printf("%08X\n", vid->features);   curl_global_sslset(CURLSSLBACKEND_OPENSSL, NULL, NULL);   curl_version_info(CURL

Re: curl_version_info() thread-safety

2022-09-25 Thread Patrick Monnerat via curl-library
On 9/25/22 09:00, Ray Satiro via curl-library wrote: On 9/24/2022 12:22 PM, Patrick Monnerat via curl-library wrote: Shouldn't the backend have been selected via ssl initialization by the time multissl_version is called? There is also multissl_setup which is called by a bunch of multissl_ f

Test 1452 failing on ElectroBSD when executed with valgrind

2022-09-25 Thread Fabian Keil via curl-library
I recently noticed that test 1452 is failing on my ElectroBSD system when run with valgrind: fk@t520 ~/git/curl/tests $./runtests.pl -v 1452 CMD (256): valgrind >/dev/null 2>&1 CMD (0): valgrind --help 2>&1 | grep -- --tool > /dev/null 2>&1 CMD (0): ../src/curl --version 1>log/curlverout.log 2>log

Re: Test 1452 failing on ElectroBSD when executed with valgrind

2022-09-25 Thread Timothe Litt via curl-library
The 56 exit code is the "Recv failure: Connection reset by peer" from curl. valgrind might affect timing. If you expect anyone to look into this, you probably should post the valgrind log (log/valgrind1452) to see what it is doing, and log/telnet_server.log to see why the telnet server is clos

Re: curl_version_info() thread-safety

2022-09-25 Thread Daniel Stenberg via curl-library
On Sun, 25 Sep 2022, Patrick Monnerat wrote: Good research and findings! I see only 2 solutions to this: 1) Consider multiSSL as a backend on its own that do not support HTTPS-proxy. Even after setting the real backend. 2) Document curl_version_info() as not threadsafe until curl_global_ini

Re: curl_version_info() thread-safety

2022-09-25 Thread Patrick Monnerat via curl-library
On 9/25/22 15:41, Daniel Stenberg wrote: On Sun, 25 Sep 2022, Patrick Monnerat wrote: Good research and findings! I see only 2 solutions to this: 1) Consider multiSSL as a backend on its own that do not support HTTPS-proxy. Even after setting the real backend. 2) Document curl_version_in

Re: Test 1452 failing on ElectroBSD when executed with valgrind

2022-09-25 Thread Fabian Keil via curl-library
Timothe Litt via curl-library wrote on 2022-09-25 at 08:07:19: > The 56 exit code is the "Recv failure: Connection reset by peer" from > curl. > > valgrind might affect timing. I suspect the same. > If you expect anyone to look into this, you probably should post the > valgrind log (log/val

Re: Test 1452 failing on ElectroBSD when executed with valgrind

2022-09-25 Thread Timothe Litt via curl-library
Looks like to get anything useful from the telnet server log, you need to specify --verbose there. See curl/tests/negtelnetserver.py Don't know if there's a default timeout on the socketserver object; you can set timeout=None on it if so. Beyond that, I'll let someone closer to the tests tak

Re: Test 1452 failing on ElectroBSD when executed with valgrind

2022-09-25 Thread Daniel Stenberg via curl-library
On Sun, 25 Sep 2022, Fabian Keil via curl-library wrote: I recently noticed that test 1452 is failing on my ElectroBSD system when run with valgrind: I tried running it a 100 times on my Linux machine first with valgrind and then without, but I couldn't see any problem. 13:43:19.783326 ==