Thanks Dan for the clarification.
I think it might be worth mentioning in the doc that this function might
create a thread.
Would setting CURLOPT_RESOLVE result in curl_multi_perform never creating a
new thread?

Also when I run multi-app.c in helgrind, I see:

> ==339231== ---Thread-Announcement------------------------------------------
> ==339231==
> ==339231== Thread #1 is the program's root thread
> ==339231==
> ==339231== ----------------------------------------------------------------
> ==339231==
> ==339231== Thread #1: pthread_mutex_destroy with invalid argument
> ==339231==    at 0x483FC96: ??? (in
> /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_helgrind-amd64-linux.so)
> ==339231==    by 0x572D16F: ??? (in
> /usr/lib/x86_64-linux-gnu/libp11-kit.so.0.3.0)
> ==339231==    by 0x4011F6A: _dl_fini (dl-fini.c:138)
> ==339231==    by 0x49468A6: __run_exit_handlers (exit.c:108)
> ==339231==    by 0x4946A5F: exit (exit.c:139)
> ==339231==    by 0x4924089: (below main) (libc-start.c:342)
> ==339231==
> ==339231== ----------------------------------------------------------------
> ==339231==
> ==339231== Thread #1: pthread_mutex_destroy with invalid argument
> ==339231==    at 0x483FC96: ??? (in
> /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_helgrind-amd64-linux.so)
> ==339231==    by 0x4011F6A: _dl_fini (dl-fini.c:138)
> ==339231==    by 0x49468A6: __run_exit_handlers (exit.c:108)
> ==339231==    by 0x4946A5F: exit (exit.c:139)
> ==339231==    by 0x4924089: (below main) (libc-start.c:342)
>

Are these false positives?

Thank you

On Wed, Sep 20, 2023 at 9:17 PM Dan Fandrich via curl-library <
curl-library@lists.haxx.se> wrote:

> On Wed, Sep 20, 2023 at 09:11:32PM -0400, Anass Meskini via curl-library
> wrote:
> > I compiled curl from the github repository with --with-openssl then I
> compiled
> > multi-app.c.
> > When I run the program in gdb and add a breakpoint for pthread_create I
> see:
>
> curl will use the threaded resolver option by default, so yes, this is
> expected. You can configure with the --disable-threaded-resolver or
> --enable-ares option to avoid this.
>
> Dan
> --
> Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-library
> Etiquette:   https://curl.se/mail/etiquette.html
>
-- 
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html

Reply via email to