-
-
Notifications
You must be signed in to change notification settings - Fork 7k
lib: return properly on OOM #20100
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
lib: return properly on OOM #20100
Conversation
|
Analysis of PR #20100 at 5c85b0db: Test ../../tests/http/test_07_upload.py::TestUpload::test_07_70_put_earlydata[h3-limited-body] failed, but it has been 0.5% flaky lately, so it's probably NOT a fault of the PR. Note that this test has failed in 2 different CI jobs (the link just goes to one of them). Generated by Testclutch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request improves error handling for out-of-memory (OOM) conditions across three different components, ensuring that OOM errors are properly propagated rather than being masked by generic error codes.
Key changes:
- Properly map OOM errors from underlying functions to appropriate error codes
- Add early exit on OOM in socket creation loops to prevent unnecessary iterations
- Detect OOM conditions from socket creation failures based on errno values
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| lib/urlapi.c | Converts CURLE_OUT_OF_MEMORY from Curl_parse_login_details to CURLUE_OUT_OF_MEMORY instead of generic CURLUE_BAD_LOGIN |
| lib/ftp.c | Adds early return when Curl_socket_open fails with CURLE_OUT_OF_MEMORY to avoid continuing the retry loop |
| lib/cf-socket.c | Maps socket creation failures with SOCKENOMEM errno to CURLE_OUT_OF_MEMORY instead of generic CURLE_COULDNT_CONNECT |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
augment review |
🤖 Augment PR SummarySummary: Tightens libcurl error propagation so out-of-memory conditions are returned explicitly instead of being reported as generic connection/login failures. 🤖 Was this summary useful? React with 👍 or 👎 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More strict torture findings