lucet
lucet copied to clipboard
Fix veriwasm fuzzing script
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.
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?