-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Regression on parsing large config files #11431
Comments
The maximum line length as (arbitrarily) set to 100K in 47dd957. Would it help if we bumped it to say 10M instead? |
It would certainly decrease the risk of real world application suffering from this, for sure! I'm wondering if a better solution would be to let config file supply multi-line params (either for lines that ends with a |
Would that mean allocating 10MB for every config? Wouldn't there be a way to start with a smaller size and allocate more memory later if needed? Maybe starting by allocating something small like 256KB and doubling it every time one runs into an out of memory error? |
No, it means that it allows the allocation to grow that big if necessary. It will still only load the amount of data that exists so this change will not make curl use any more data than before if the lines are shorter than 100K... |
Bumped from 100K set in 47dd957 Reported-by: Antoine du Hamel Fixes curl#11431 Closes curl#11435
Bumped from 100K set in 47dd957 Reported-by: Antoine du Hamel Fixes curl#11431 Closes curl#11435
I did this
We noticed the issue as sometimes requests with very large payload were failing on production when trying to bump the cURL version. I was able to create a minimal repro using a Node.js script:
The failure seems to appear as soon as the config file is strictly larger than 102399 bytes (≥100kiB), at which point curl ignores the data and sends an empty GET request instead of a POST request with the payload.
I expected the following
Passes on 7.72.0:
Starting from 7.73.0 and up (I didn't try all versions, only a few up to 8.1.1):
Tried with cURL 8.1.1 on macOS, the failure is a bit different – but I would still expect the code to succeed:
curl/libcurl version
See above.
https://github.com/curl/curl/compare/curl-7_72_0..curl-7_73_0
operating system
Bisected on Ubuntu to pin point which version introduced the regression. I was able to reproduce on macOS with cURL v8.1.1 as well
The text was updated successfully, but these errors were encountered: