CURL_LOCK_DATA_CONNECT can cause concurrent access to a connection on multiple threads #4544
I did this
We've seen race conditions when using CURL_LOCK_DATA_CONNECT in libcurl where sometimes two different threads using two different easy handles ends up sharing the same connection pointer at the same time.
I added curl cpp code which stresses CURL_LOCK_DATA_CONNECT and should eventually trigger an ASAN error or crash with curl compiled using clang's address sanitizers.
Sample program which can reproduce this issue:
An example of ASAN output when this issue is hit with additional logging.
Notably three threads with different easy handles decide to reuse the 0x61b000fbd688 connection at the same time.
This issue is reproducible on libcurl master.
The text was updated successfully, but these errors were encountered: