Stream: git-wasmtime

Topic: wasmtime / PR #10487 fuzz: enable `relaxed-simd` for the ...


view this post on Zulip Wasmtime GitHub notifications bot (Mar 29 2025 at 16:57):

Robbepop edited PR #10487.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 29 2025 at 16:58):

Robbepop edited PR #10487:

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.

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.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 29 2025 at 17:11):

Robbepop edited PR #10487:

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.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 29 2025 at 18:46):

github-actions[bot] commented on PR #10487:

Subscribe to Label Action

cc @fitzgen

<details>
This issue or pull request has been labeled: "fuzzing"

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

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

Learn more.
</details>

view this post on Zulip Wasmtime GitHub notifications bot (Mar 31 2025 at 18:39):

alexcrichton commented on PR #10487:

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

view this post on Zulip Wasmtime GitHub notifications bot (Mar 31 2025 at 19:19):

Robbepop commented on PR #10487:

@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.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 31 2025 at 19:20):

Robbepop edited a comment on PR #10487:

@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. :thinking:

view this post on Zulip Wasmtime GitHub notifications bot (Mar 31 2025 at 19:41):

alexcrichton commented on PR #10487:

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

view this post on Zulip Wasmtime GitHub notifications bot (Mar 31 2025 at 20:14):

Robbepop commented on PR #10487:

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.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 02 2025 at 09:11):

Robbepop commented on PR #10487:

I think this can be closed for now.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 02 2025 at 14:23):

alexcrichton closed without merge PR #10487.


Last updated: Apr 18 2025 at 00:13 UTC