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

feat: differentially fuzz wasmer2 against wasmtime #7025

Merged
merged 4 commits into from
Jun 16, 2022

Conversation

Ekleog
Copy link
Contributor

@Ekleog Ekleog commented Jun 13, 2022

Fixes #6184

@Ekleog Ekleog requested a review from matklad June 13, 2022 15:02
@Ekleog Ekleog requested a review from a team as a code owner June 13, 2022 15:02
let code = ContractCode::new(module.0.module.to_bytes(), None);
let wasmer2 = run_fuzz(&code, VMKind::Wasmer2);
let wasmtime = run_fuzz(&code, VMKind::Wasmtime);
assert_eq!(wasmer2, wasmtime);
Copy link
Contributor

Choose a reason for hiding this comment

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

Hm, this I think shouldn't work? wasmer2 and wasmtime differ at least in the texts of some error messages.

If this actually works, perhaps that means that our fuzzing is not deep at all? Makes sense to look at .opaque_err tests too see which cases should trip this assert.

Copy link
Contributor Author

@Ekleog Ekleog Jun 14, 2022

Choose a reason for hiding this comment

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

Well, I ran it only a few minutes on my laptop, so there's quite a chance that given a bit more time it'd have found error messages that differ! That said, looking for .opaque_error() looks to me like something that'd at least take a few hours for our fuzzing infra to find (sandbox-specific imports we probably can't generate, or too many imports), so it makes sense to me that my laptop wasn't able to find them :)
I just pushed a commit censoring the error contents, so this should hopefully be handled now :)

(I also censored the logs, but did not censor the profile data as it seems to be purely gas-related and we do want to check that gas profile is the same across runtimes)

@matklad matklad self-requested a review June 14, 2022 22:07
Copy link
Contributor

@matklad matklad left a comment

Choose a reason for hiding this comment

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

LGTM, but needs a reformat!

@matklad
Copy link
Contributor

matklad commented Jun 15, 2022

@pompon0 could you look at the test failure here? Seems spurious proto compat failure?

@pompon0
Copy link
Contributor

pompon0 commented Jun 15, 2022

Yes, that's because the proto presubmit check compares against master head, rather than against the lowest common ancestor of master and this branch. I'll try to fix that. In the meantime please just rebase to master head.

@pompon0
Copy link
Contributor

pompon0 commented Jun 15, 2022

fix in flight: #7046

@near-bulldozer near-bulldozer bot merged commit f66738b into near:master Jun 16, 2022
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.

Differential fuzzing of wasmtime vs wasmer
3 participants