multi: allow table handle sizes to be overridden #1982

wants to merge 1 commit into


None yet
3 participants

cmeister2 commented Oct 11, 2017

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


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 commented Oct 11, 2017

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 commented Oct 11, 2017

(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 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:


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 commented Oct 12, 2017

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

multi: allow table handle sizes to 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 from multi: Use Easy multi_handle settings when fuzzing to multi: allow table handle sizes to be overridden Oct 23, 2017


cmeister2 commented Oct 23, 2017

Change proposed by @bagder now made.

@bagder bagder closed this in 3340b45 Oct 25, 2017


bagder commented Oct 25, 2017


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment