Stream: git-wasmtime

Topic: wasmtime / issue #5510 Use floats for `wasmtime::componen...


view this post on Zulip Wasmtime GitHub notifications bot (Jan 03 2023 at 19:23):

lann commented on issue #5510:

I failed to mention: this removes the #[derive(Eq)] from Val and some related structs because f{32,64} aren't Eq. I think this makes sense in this context but its technically a breaking change.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 03 2023 at 19:25):

lann edited a comment on issue #5510:

I failed to mention: this removes the #[derive(Eq)] from Val and some related structs because f{32,64} aren't Eq. I think this makes sense in this context but it's technically a breaking change.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 03 2023 at 19:25):

alexcrichton commented on issue #5510:

Yeah that's ok and I think it makes sense as well due to the usage of floats it shouldn't be applicable for Val anyway.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 03 2023 at 19:56):

github-actions[bot] commented on issue #5510:

Subscribe to Label Action

cc @fitzgen, @peterhuene

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

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 (Jan 05 2023 at 20:40):

alexcrichton commented on issue #5510:

It looks like this broke fuzzing here because nan is no longer equal to nan. @lann would you be up for helping to fix this? I think the way to fix it would be to write a custom equality function which considers two NaN values to be equal.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 05 2023 at 21:18):

lann commented on issue #5510:

Would it make sense to change the test code? e.g.

match (expected, actual) {
    // NaNs never compare equal
    (Val::Float32(expected), Val::Float32(actual)) if expected.is_nan() => assert!(actual.is_nan()),
    (Val::Float64(expected), Val::Float64(actual)) if expected.is_nan() => assert!(actual.is_nan()),
    (expected, actual) => assert_eq!(expected, actual),
};

view this post on Zulip Wasmtime GitHub notifications bot (Jan 05 2023 at 21:22):

alexcrichton commented on issue #5510:

More-or-less that's what needs to happen, but floats can appear recursively as well so the equality change there would need to be applied deeply through types like lists and recors too


Last updated: Nov 22 2024 at 16:03 UTC