Recommit "[libFuzzer] Fix value-profile-load test."
value-profile-load.test needs adjustment with a mutator change in bb54bcf8, which reverted as of now, but will be recommitted after landing this patch. This patch makes value-profile-load.test more friendly to (and aware of) the current value profiling strategy, which is based on the hamming as well as the absolute distance. To this end, this patch adjusts the set of input values that trigger an expected crash. More specifically, this patch now uses a single value 0x01effffe as a crashing input, because this value is close to values like {0x1ffffff, 0xffffff, ...}, which are very likely to be added to the corpus per the current hamming- and absolute-distance-based value profiling strategy. Note that previously the crashing input values were {1234567 * {1, 2, ...}, s.t. < INT_MAX}. Every byte in the chosen value 0x01effeef is intentionally different; this was to make it harder to find the value without the intermediate inputs added to the corpus by the value profiling strategy. Also note that LoadTest.cpp now uses a narrower condition (Size != 8) for initial pruning of inputs, effectively preventing libFuzzer from generating inputs longer than necessary and spending time on mutating such long inputs in the corpus - a functionality not meant to be tested by this specific test. Differential Revision: https://reviews.llvm.org/D86247
Loading
Please sign in to comment