lucet icon indicating copy to clipboard operation
lucet copied to clipboard

Fix veriwasm fuzzing script

Open enjhnsn2 opened this issue 2 years ago • 1 comments

To the best of my knowledge, the current veriwasm fuzzing script will not actually report an error when veriwasm fails to verify the compiled code. This is because the fuzz_target! harness will only catch panics, and the script does not panic on error. This change will make the script panic on verification failure. I'm not super familiar with using libfuzzer in rust, so if this is a mistake let me know.

enjhnsn2 avatar Aug 25 '21 21:08 enjhnsn2

This should work: the ? (try-operator) at the call to build() will bubble any errors up from run_test() to the toplevel fuzzing entry point, and then the .expect("build with VeriWasm check failed") will catch the Err at that point and panic. Are you seeing cases where a VeriWasm error is silently ignored?

cfallin avatar Aug 25 '21 21:08 cfallin