Skip to content
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

multi: allow table handle sizes to be overridden #1982

Closed
wants to merge 1 commit into from
Closed

multi: allow table handle sizes to be overridden #1982

wants to merge 1 commit into from

Conversation

cmeister2
Copy link
Contributor

When fuzzing, use the smaller Easy values for Curl_multi_handle() for speed of setup.

@jay
Copy link
Member

jay commented Oct 11, 2017

Wouldn't we want curl to function as close as possible to normal when fuzzing? In other words are these FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION blocks really necessary

@cmeister2
Copy link
Contributor Author

Fuzz targets are allowed to make concessions if it would improve the overall fuzzing effort. For example, some fuzzers disable randomness so that things are more deterministic.

This fix wouldn't fundamentally change the function here. There is no need for the curl_multi_init() function to use so many hash entries; it will use a single connection in its lifetime. Setting up hundreds of hash entries is an unnecessary overhead.

@cmeister2
Copy link
Contributor Author

(I have however found another fix to the fuzzer which has sped it up by a significant margin, so this fix is now less important)

@bagder
Copy link
Member

bagder commented Oct 12, 2017

The code is written to allow CURL_SOCKET_HASH_TABLE_SIZE to be changed at build-time without requiring any code change:

CPPFLAGS=-DCURL_SOCKET_HASH_TABLE_SIZE=13 ./configure

I wouldn't mind changing the code to allow the same thing for CURL_CONNECTION_HASH_SIZE.

I think that's a much nicer approach.

@cmeister2
Copy link
Contributor Author

Happy to do that - didn't realise that CURL_SOCKET_HASH_TABLE_SIZE could be overridden.

Allow users to specify their own hash define for CURL_CONNECTION_HASH_SIZE so that both values can be overridden.
@cmeister2 cmeister2 changed the title multi: Use Easy multi_handle settings when fuzzing multi: allow table handle sizes to be overridden Oct 23, 2017
@cmeister2
Copy link
Contributor Author

Change proposed by @bagder now made.

@bagder bagder closed this in 3340b45 Oct 25, 2017
@bagder
Copy link
Member

bagder commented Oct 25, 2017

thanks!

@lock lock bot locked as resolved and limited conversation to collaborators Jan 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants