-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
aws-cpp-sdk-core/source/http/curl/CurlHttpClient.cpp: Bad call to cURL #2883
Comments
Thanks for pointing this out, we're testing your fix |
Hi, thank you for the fix. However, on the very next line there is a similar issue, but there the logic is reversed: 904 curl_off_t speed; |
And a co-worker just pointed out that the "curl_off_t speed" is also mis-used for CURLINFO_SPEED_UPLOAD_T vs. CURLINFO_SPEED_UPLOAD a few lines further down. |
created another PR, take a look and approve if everything looks good to you |
That seems like a proper solution. I think in this case a comment might be warranted to explain the slightly tricky definition of either a double or curl_off_t of 'metric', but I'll leave that up to you. Thank you for the quick support! |
This issue is now closed. Comments on closed issues are hard for our team to see. |
Describe the bug
During an an update of cURL code a type-error crept in near line 890. The new CURLINFO_APPCONNECT_TIME_T cURL api returns a curl_off_t, the code still uses a double. This causes a nasty floating point exception.
Expected Behavior
no crash.
Current Behavior
Crash.
Reproduction Steps
Build AWS core on Linux, run code that establishes an HTTP(s) session. Stack trace of an example crash (signal SIGFPE, floating point exception):
Possible Solution
We've patched the code as follows:
Additional Information/Context
The fix works.
AWS CPP SDK version used
1.11.277
Compiler and Version used
g++ (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5)
Operating System and version
Linux i-0ea8deb92c374.stable.infordev.local 5.10.209-198.858.amzn2.x86_64 #1
The text was updated successfully, but these errors were encountered: