summaryrefslogtreecommitdiff
path: root/compiler-rt/test/fuzzer/LoadTest.cpp
AgeCommit message (Collapse)Author
2020-08-27Recommit "[libFuzzer] Fix value-profile-load test."Dokyung Song
value-profile-load.test needs adjustment with a mutator change in bb54bcf84970c04c9748004f3a4cf59b0c1832a7, 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
2020-08-20Revert "[libFuzzer] Fix value-profile-load test."Vitaly Buka
D86247 fails on Windows. This reverts commit 428bebaf10e177db5e42206ca8f871f0bcbef058.
2020-08-19[libFuzzer] Fix value-profile-load test.Dokyung Song
The behavior of the CrossOver mutator has changed with bb54bcf84970c04c9748004f3a4cf59b0c1832a7. This seems to affect the value-profile-load test on Darwin. This patch provides a wider margin for determining success of the value-profile-load test, by testing the targeted functionality (i.e., GEP index value profile) more directly and faster. To this end, 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. Previously, on x86/Linux, it required 6,597,751 execs with -use_value_profile=1 and 19,605,575 execs with -use_value_profile=0 to hit the crash. With this patch, the test passes with 174,493 execs, providing a wider margin from the given trials of 10,000,000. Note that, without the value profile (i.e., -use_value_profile=0), the test wouldn't pass as it still requires 19,605,575 execs to hit the crash. Differential Revision: https://reviews.llvm.org/D86247
2019-01-19Update the file headers across all of the LLVM projects in the monorepoChandler Carruth
to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
2017-08-21Move libFuzzer to compiler_rt.George Karpenkov
Resulting library binaries will be named libclang_rt.fuzzer*, and will be placed in Clang toolchain, allowing redistribution. Differential Revision: https://reviews.llvm.org/D36908 llvm-svn: 311407