[PATCH] D140239: [llvm-stress] Add a mutation fuzzing mode

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 16 11:24:19 PST 2022


reames created this revision.
reames added reviewers: Peter, nikic, bjope, fhahn.
Herald added subscribers: bollu, mcrosier.
Herald added a project: All.
reames requested review of this revision.
Herald added a project: LLVM.

This change generalizes llvm-stress by adding a sub-command to mutate an input IR file.  This involves splitting the existing functionality into a sub-command of it's own (though its still the default).

The main change for the existing behavior is the following:

1. An optional "generate" command is added.  You can continue to not specify a sub-command, and we default to "generate" (i.e. legacy behavior.)
2. Several cl::opts which are specific to generate are moved under that sub-command.  This is unfortunately, a breaking change.  These options will no longer be accepted without an explicit sub-command being given, and the help text is moved under "llvm-stress help generate".

The newly added mode exposes the existing mutation logic used by our various libfuzzer based fuzzers.  This allows the logic to be exercised, and used, when not linking against libfuzzer.

p.s. I know the command guide page needs rewritten.  I figured I'd get initial feedback on the approach before doing so.  That's definitely a blocker item for landing this.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D140239

Files:
  llvm/tools/llvm-stress/CMakeLists.txt
  llvm/tools/llvm-stress/llvm-stress.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D140239.483608.patch
Type: text/x-patch
Size: 6553 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221216/964e25ec/attachment.bin>


More information about the llvm-commits mailing list