Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable cranelift's verifier by default #882

Merged
merged 1 commit into from
Feb 6, 2020

Conversation

alexcrichton
Copy link
Member

The intention of the wasmtime crate was to disable this verifier by
default, but it looks like cranelift actually has it turned on by
default which was making our documentation incorrect!

This was discovered by seeing a number of timeouts when fuzzing. The
debug verifier is great for fuzzing, however, so fuzzing is updated to
enable this unconditionally, meaning we'll still have timeouts. For
general users though this should make the documentation correct that the
wasmtime crate, by default, disables the debug verifier.

The intention of the `wasmtime` crate was to disable this verifier by
default, but it looks like cranelift actually has it turned on by
default which was making our documentation incorrect!

This was discovered by seeing a number of timeouts when fuzzing. The
debug verifier is great for fuzzing, however, so fuzzing is updated to
enable this unconditionally, meaning we'll still have timeouts. For
general users though this should make the documentation correct that the
`wasmtime` crate, by default, disables the debug verifier.
@sunfishcode
Copy link
Member

Would it make sense to enable the verifier when #[cfg(test)] is set too?

@alexcrichton
Copy link
Member Author

Unfortunately #[cfg(test)] won't work since that's only ever set for --test compilations, meaning that if you link to wasmtime it wouldn't pick it up.

An alternative though would be to do what the CLI does, enable the debug verifier based on #[cfg(debug_assertions)]

Copy link
Member

@sunfishcode sunfishcode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the PR here is good for now; we can adjust this later if needed.

@sunfishcode sunfishcode merged commit c860edc into bytecodealliance:master Feb 6, 2020
@alexcrichton alexcrichton deleted the disable-verify branch February 25, 2020 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants