-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
libcurl.dll x86_64 exception occasionally #69
Comments
|
well,I do the test for unpatched libcurl,it's seems happen also.here is the exception shotscreen,the libcurl version is curl-8_5_0,same as curl-impersonate use.maybe this is a bug of libcurl. I use msvc compiler,my compile command line is: cmake .. -DZLIB_INCLUDE_DIR=../../zlib/ -DZLIB_LIBRARY=../../zlib/build/Debug/ -DUSE_NGHTTP2=ON -DNGHTTP2_INCLUDE_DIR=../../nghttp2/ -DNGHTTP2_LIBRARY=../../nghttp2/build/lib/Debug/ -DCURL_USE_OPENSSL=ON -DBUILD_STATIC_LIBS=ON -DBUILD_SHARED_LIBS=OFF -DCURL_ENABLE_SSL=ON -DCURL_DISABLE_INSTALL=OFF -DCURL_STATIC_CRT=ON -DENABLE_UNICODE=ON -DCURL_BROTLI=ON -DCURL_ZSTD=ON -DENABLE_IPV6=ON -DUSE_ECH=ON -DENABLE_WEBSOCKETS=ON -DBUILD_TESTING=OFF -DOPENSSL_INCLUDE_DIR=../../boringssl/include/ -DOPENSSL_CRYPTO_LIBRARY=../../boringssl/lib/ -DOPENSSL_ROOT_DIR=../boringssl/ -DBROTLI_INCLUDE_DIR=../../brotli/c/include/ -DBROTLIDEC_LIBRARY=../../brotli/lib/ -DBROTLICOMMON_LIBRARY=../../brotli/lib/ -DZstd_INCLUDE_DIR=../../zstd/include/ -DZstd_LIBRARY=../../zstd/static/ and the original release of curl-impersonate has the same exception even it's no symbol,I debugged,is't same exception position. curl_share_setopt(share, CURLSHOPT_SHARE, CURL_LOCK_DATA_DNS);
curl_share_setopt(share, CURLSHOPT_SHARE, CURL_LOCK_DATA_CONNECT);
curl_share_setopt(share, CURLSHOPT_SHARE, CURL_LOCK_DATA_SSL_SESSION);
curl_share_setopt(share, CURLSHOPT_SHARE, CURL_LOCK_DATA_HSTS);
// Set lock and unlock callback functions
curl_share_setopt(share, CURLSHOPT_LOCKFUNC, curl_lock);
curl_share_setopt(share, CURLSHOPT_UNLOCKFUNC, curl_unlock); and if (gCurlShare != nullptr)
curl_easy_setopt(curl, CURLOPT_SHARE, gCurlShare); nothing especially. void Curl_resolver_cancel(struct Curl_easy *data)
{
destroy_async_data(&data->conn->resolve_async);
} to: void Curl_resolver_cancel(struct Curl_easy *data)
{
if (data->conn)
destroy_async_data(&data->conn->resolve_async);
} seems works fine.
to libcurl compile command line to force libcurl use c-ares to resolve DNS. seems works ok. |
The latest version of curl is 8.8.0, and I'm in the progress of upgrading curl-impersonate to be based on 8.7.1, see #67. If this issue can be reproduced with 8.8.0, you might want to open an issue in the curl project. |
Has anyone encountered occasional exceptions with the libcurl.dll library in the Windows x86_64 version? Through debugging and analysis, it was found that in the function
void Curl_resolver_cancel(struct Curl_easy *data) { destroy_async_data(&data->conn->resolve_async); },
the data->conn is already null. It seems that the following function is called twice:`/**/
void Curl_detach_connection(struct Curl_easy *data);`
The comment within this function also indicates that there may be occasional multiple clearings of data->conn. In actual use, this occasionally triggers exceptions, and there is no 100% reproducible method found. However, after switching to using the c-ares library, the problem has not been observed so far.
The text was updated successfully, but these errors were encountered: