[all-commits] [llvm/llvm-project] b79783: [lldb/Fuzzer] Add fuzzer for expression evaluator

Chelsea Cassanova via All-commits all-commits at lists.llvm.org
Fri Jul 22 14:32:20 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b797834748f1954950880bf50fb78abedd4494e6
      https://github.com/llvm/llvm-project/commit/b797834748f1954950880bf50fb78abedd4494e6
  Author: Chelsea Cassanova <chelsea at cassanova.me>
  Date:   2022-07-22 (Fri, 22 Jul 2022)

  Changed paths:
    M clang/cmake/modules/ProtobufMutator.cmake
    M clang/tools/clang-fuzzer/handle-cxx/CMakeLists.txt
    M clang/tools/clang-fuzzer/proto-to-cxx/CMakeLists.txt
    M lldb/tools/lldb-fuzzer/CMakeLists.txt
    A lldb/tools/lldb-fuzzer/lldb-expression-fuzzer/CMakeLists.txt
    A lldb/tools/lldb-fuzzer/lldb-expression-fuzzer/lldb-expression-fuzzer.cpp

  Log Message:
  -----------
  [lldb/Fuzzer] Add fuzzer for expression evaluator

This commit adds a fuzzer for LLDB's expression evaluator.
The fuzzer takes a different approach than the current fuzzers
present, and uses an approach that is currently being used for
clang fuzzers.

Instead of fuzzing the evaluator with randomly mutated
characters, protobufs are used to generate a subset of C++. This
is then converted to valid C++ code and sent to the expression
evaluator. In addition, libprotobuf_mutator is used to mutate
the fuzzer's inputs from valid C++ code to valid C++ code, rather
than mutating from valid code to total nonsense.

Differential revision: https://reviews.llvm.org/D129377




More information about the All-commits mailing list