[all-commits] [llvm/llvm-project] 52f1df: Recommit "[libFuzzer] Fix value-profile-load test."

Dokyung Song via All-commits all-commits at lists.llvm.org
Thu Aug 27 12:12:57 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 52f1df09237312eac044f84ca4c4f9e49aea0b9b
      https://github.com/llvm/llvm-project/commit/52f1df09237312eac044f84ca4c4f9e49aea0b9b
  Author: Dokyung Song <dokyungs at google.com>
  Date:   2020-08-27 (Thu, 27 Aug 2020)

  Changed paths:
    M compiler-rt/test/fuzzer/LoadTest.cpp
    M compiler-rt/test/fuzzer/value-profile-load.test

  Log Message:
  -----------
  Recommit "[libFuzzer] Fix value-profile-load test."

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




More information about the All-commits mailing list