Stream: git-wasmtime

Topic: wasmtime / PR #5140 [wip] Cleanup wasmi fuzzing code


view this post on Zulip Wasmtime GitHub notifications bot (Oct 27 2022 at 13:03):

Robbepop opened PR #5140 from rf-cleanup-wasmi-fuzzer to main:

Just some minor clean ups to the wasmi fuzzer code.
Unfortunately due to compilation/linkage problems with the OCaml based spec interpreter I could not run the fuzz tests locally so there might be bugs that I have to fix ... :/

Can we run fuzz tests via CI?

view this post on Zulip Wasmtime GitHub notifications bot (Oct 27 2022 at 14:37):

Robbepop updated PR #5140 from rf-cleanup-wasmi-fuzzer to main.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 27 2022 at 14:42):

alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 27 2022 at 14:42):

alexcrichton created PR review comment:

Could the .unwrap() be retained here and on memory? If the export isn't present or is of a different type that's a bug in the fuzz harness which we need to fix and the .unwrap() helps uncoveri t.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 27 2022 at 14:43):

Robbepop submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 27 2022 at 14:43):

Robbepop created PR review comment:

yeah I just noticed that this unwrap might have been intentional for exactly that purpose. I will try to fix it.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 27 2022 at 14:45):

Robbepop created PR review comment:

under what circumstances is get_global supposed to return Some value?

view this post on Zulip Wasmtime GitHub notifications bot (Oct 27 2022 at 14:45):

Robbepop submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 27 2022 at 14:46):

Robbepop edited PR review comment.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 27 2022 at 14:50):

Robbepop submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 27 2022 at 14:50):

Robbepop created PR review comment:

Something like

self.instance
    .get_export(&self.store, name)
    .and_then(wasmi::Extern::into_global)
    .map(|global| global.get(&self.store))
    .map(DiffValue::from)
    .unwrap()
    .into()
```
Or would you rather have the original code back?
~~~

view this post on Zulip Wasmtime GitHub notifications bot (Oct 27 2022 at 14:52):

Robbepop updated PR #5140 from rf-cleanup-wasmi-fuzzer to main.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 27 2022 at 15:02):

alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 27 2022 at 15:02):

alexcrichton created PR review comment:

This is intended for JS where JS can't get the value of an exported v128 global, for example. So only for situations where the engine for some reason is unable to retrieve the value. For wasmi though it should be able to retrieve the value in all situations.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 27 2022 at 15:28):

Robbepop has marked PR #5140 as ready for review.


Last updated: Oct 23 2024 at 20:03 UTC