cURL 8.16.0's Catastrophic pthread_cancel and its Removal
2025-09-13
cURL 8.16.0 introduced the use of pthread_cancel to interrupt getaddrinfo(), aiming for performance improvements. However, this change caused serious memory leaks. This is because getaddrinfo() can be cancelled while reading /etc/gai.conf, leading to un-released allocated memory. Due to the difficulty in resolving this issue and the potential for serious stability problems, the cURL team decided to remove this functionality in #18540, recommending users utilize the c-ares library as an alternative, despite some functional limitations.
Read more
Development
memory leak