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
base: master
from

Conversation

Projects
None yet
3 participants
@cmeister2
Contributor

cmeister2 commented Oct 11, 2017

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

@jay

This comment has been minimized.

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

This comment has been minimized.

Contributor

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

This comment has been minimized.

Contributor

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

This comment has been minimized.

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

This comment has been minimized.

Contributor

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 force-pushed the cmeister2:cmeister2/multifuzzeasy branch from 72c6972 to 3de05d8 Oct 23, 2017

@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

This comment has been minimized.

Contributor

cmeister2 commented Oct 23, 2017

Change proposed by @bagder now made.

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

@bagder

This comment has been minimized.

Member

bagder commented Oct 25, 2017

thanks!

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