cargo-fuzz icon indicating copy to clipboard operation
cargo-fuzz copied to clipboard

Command line argument to disable debug assertions on fuzz run

Open oherrala opened this issue 5 months ago • 1 comments

There's no command line argument to disable debug assertions on a fuzz run without doing optimized build as documented in fuzz run --help:

  -a, --debug-assertions
          Build artifacts with debug assertions and overflow checks enabled (default if not -O)

Maybe add a new argument (-A?) to disable debug assertions.

Workaround is to pass it from environment via RUSTFLAGS="-C debug-assertions=false".

oherrala avatar Aug 08 '25 10:08 oherrala

Not sure if clap supports it, but it would be nice if we could have a tri-state thing that supported the following

  • --debug-assertions=true
  • --debug-assertions=false
  • --debug-assertions (alias for =true)

and this would be backwards compatible as well.

fitzgen avatar Aug 08 '25 17:08 fitzgen