Skip to content
This repository has been archived by the owner on Mar 24, 2022. It is now read-only.

Fix veriwasm fuzzing script #671

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

enjhnsn2
Copy link
Contributor

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.

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.
@cfallin
Copy link
Member

cfallin commented Aug 25, 2021

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?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants