==7693== Possible data race during read of size 4 at 0x54EC5E0 by thread #8
==7693== Locks held: none
==7693== at 0x51C6128: ??? (in /lib/x86_64-linux-gnu/libcrypto.so.1.0.0)
==7693== by 0x51C638C: ??? (in /lib/x86_64-linux-gnu/libcrypto.so.1.0.0)
==7693== by 0x51C6F6F: ERR_remove_thread_state (in /lib/x86_64-linux-gnu/libcrypto.so.1.0.0)
==7693== by 0x4297B4: Curl_close (in /home/romerohe/proyects/cpp/libcurl/main)
==7693== by 0x411A40: Curl_conncache_close_all_connections (in /home/romerohe/proyects/cpp/libcurl/main)
==7693== by 0x40BCEE: curl_multi_cleanup (in /home/romerohe/proyects/cpp/libcurl/main)
==7693== by 0x42974B: Curl_close (in /home/romerohe/proyects/cpp/libcurl/main)
==7693== by 0x4079C4: curl_easy_cleanup (in /home/romerohe/proyects/cpp/libcurl/main)
==7693== by 0x40732C: pull_one_url(void*) (main.cpp:30)
==7693== by 0x4C34E85: mythread_wrapper (hg_intercepts.c:389)
==7693== by 0x54F56B9: start_thread (pthread_create.c:333)
==7693==
==7693== This conflicts with a previous write of size 4 by thread #6
==7693== Locks held: none
==7693== at 0x51C6128: ??? (in /lib/x86_64-linux-gnu/libcrypto.so.1.0.0)
==7693== by 0x51C661C: ??? (in /lib/x86_64-linux-gnu/libcrypto.so.1.0.0)
==7693== by 0x51C7023: ERR_get_state (in /lib/x86_64-linux-gnu/libcrypto.so.1.0.0)
==7693== by 0x51C715D: ERR_put_error (in /lib/x86_64-linux-gnu/libcrypto.so.1.0.0)
==7693== by 0x51F8626: PEM_read_bio (in /lib/x86_64-linux-gnu/libcrypto.so.1.0.0)
==7693== by 0x51F69AD: PEM_X509_INFO_read_bio (in /lib/x86_64-linux-gnu/libcrypto.so.1.0.0)
==7693== by 0x5206396: X509_load_cert_crl_file (in /lib/x86_64-linux-gnu/libcrypto.so.1.0.0)
==7693== by 0x52064B9: ??? (in /lib/x86_64-linux-gnu/libcrypto.so.1.0.0)
==7693== Address 0x54ec5e0 is in the BSS segment of /lib/x86_64-linux-gnu/libcrypto.so.1.0.0
But there are many more. Does anyone know why? Or maybe the problem is with valgrind?
these kinds of tools are known for false alarms, which can be mitigated by settings somewhat but if you get 0 false alarms you probably have erred the wrong way and missed issues, so best to set it so you get a few but not many. That said, there could well be issues in the library or in how you used it. These are well known libraries; do you have an example program that they provide, and does a check on their example give a ton of problems?
Race conditions can exist and never be triggered, as well. The algorithm to find them can't tell if the code ever gets into a bad state, just that it could possibly. Are you able to write an example that goes into thread snarl and locks up via any of the listed race condition problems?