Fri 16 Oct 2015 07:54:04 PM UTC, comment #2:
One option for what I think what may be wanted for the fuzzer is to put an 'ifndef TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES' around the current define of TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES, so that it can be changed without actually changing ftoption.h .
Since this is a very advanced configuration configuration feature, it might make sense to put it in an ifndef and also put it back in the source file. I must admit that doing so (having an option not listed in ftoption.h seems a bit dirty.
The current means of setting this on the fuzzer side is to point to it's own ftoption.h, or to patch ftoption.h after checkout. This just means more possible maintenance on the fuzzer side, though this may be the right thing to do anyway, given that it may be beneficial to be able to change other settings here as well.
One rather squirrely thing I noticed is that FT_CONFIG_OPTION_USE_PNG define in ftoption.h is commented out, but that 'configure' will set 'FT_CONFIG_OPTION_USE_PNG=1' if libpng is found when configuring (leading to fun redefinition errors if the FT_CONFIG_OPTION_USE_PNG define is uncommented in ftoption.h and then one uses configure). If TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES were in ftoption.h but default commented out, with the implementation file providing the default if it isn't defined, then configure could grow a '--for-fuzzing-max-runnable-opcoes' or something like this to set it.
In any event, there are many possible ways of doing this, but it would be nice to have one which makes it easy for the fuzzer to indicate it.
|