Skip to content

fuzz: enable relaxed-simd for the Wasmi oracle #10487

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

Conversation

Robbepop
Copy link
Contributor

@Robbepop Robbepop commented Mar 29, 2025

This enables relaxed-simd for the Wasmi differential fuzzing oracle.

Wasmi implements all relaxed-simd operators deterministically. Fused multiply-add has only 1 rounding error on all platforms. On no_std we use libm to achieve this. Where possible Wasmi simply uses the non-relaxed counterparts for some of the relaxed-simd operators.

Note that the relaxed-simd proposal support is very new for Wasmi. I have only ran Wasmi's differential fuzzing for ~45 minutes before it crashed with the already known Wasmtime bug.

@Robbepop Robbepop requested review from a team as code owners March 29, 2025 16:53
@Robbepop Robbepop requested review from alexcrichton and removed request for a team March 29, 2025 16:53
@Robbepop Robbepop changed the title fuzz: enable relxed-simd for the Wasmi oracle fuzz: enable relaxed-simd for the Wasmi oracle Mar 29, 2025
@github-actions github-actions bot added the fuzzing Issues related to our fuzzing infrastructure label Mar 29, 2025
Copy link

Subscribe to Label Action

cc @fitzgen

This issue or pull request has been labeled: "fuzzing"

Thus the following users have been cc'd because of the following labels:

  • fitzgen: fuzzing

To subscribe or unsubscribe from this label, edit the .github/subscribe-to-label.json configuration file.

Learn more.

@alexcrichton
Copy link
Member

Unfortunately I don't think this will do anything at this time due to this line. I'm not sure how we can change that because while wasmi/wasmtime may be able to be differentially fuzzed against each other it assumes certain wasmtime configuration which isn't plumbed yet and differential execution against v8 or even the spec interpreter in the future may not be possible

@Robbepop
Copy link
Contributor Author

Robbepop commented Mar 31, 2025

@alexcrichton thanks for the clarifications.

I agree, this won't be very useful for Wasmtime at the moment. I currently do perform relaxed-simd differential fuzzing in Wasmi's fuzzer and it seems to match Wasmtime's semantics. However, I just got the weird feeling that even with config.relaxed_simd_deterministic() enbabled this might change since relaxed-simd instructions can remain deterministic while changing semantics as long as the new semantics are deterministic across platforms.

So maybe ... I should stop fuzzing relaxed-simd in Wasmi as well. 🤔

@alexcrichton
Copy link
Member

I think the intention is that the deterministic profile of relaxed-simd is spec'd as one thing and that "thing" won't change. Officially though there aren't profiles at the moment, so it's more of a handshake between folks at this point that the deterministic profile won't be changing AFAIK

@Robbepop
Copy link
Contributor Author

I think the intention is that the deterministic profile of relaxed-simd is spec'd as one thing and that "thing" won't change. Officially though there aren't profiles at the moment, so it's more of a handshake between folks at this point that the deterministic profile won't be changing AFAIK

Ah I didn't know about the deterministic profile but it seems I got it right by accident.

@Robbepop
Copy link
Contributor Author

Robbepop commented Apr 2, 2025

I think this can be closed for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fuzzing Issues related to our fuzzing infrastructure
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants