rust-fuzz/afl.rs

Add `AFL_NO_CFG_FUZZING` test

smoelius opened this issue · 0 comments

Background: #306 #398

The steps would be (roughly):

  1. Write a small a small example program that crashes only when cfg!(fuzzing) is not set.
  2. Add a test to verify that cargo-afl finds a crash exactly when cfg!(fuzzing) is not set, i.e., when cargo-afl is run with AFL_NO_CFG_FUZZING enabled.

Ideally, the example program will not just crash outright when cfg!(fuzzing) is not set. That is, cargo-afl should still have to do some work (e.g., flip a bit) to get the program to crash.