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

Update dependencies, wasmtime-19, remove wasmtime-wasi #101

Merged
merged 4 commits into from
Apr 15, 2024

Conversation

Gentle
Copy link

@Gentle Gentle commented Mar 29, 2024

wasmtime-wasi is no longer used since the preview1 host has moved to wasi-common

I'm not sure if my changes to dummy.rs are correct, I read your notes on the RefType changes, is it fine to treat NULLFUNCREF the same as FUNCREF?

the fuzzer ran out of memory at some point once, I think I just let it run for too long and couldn't reproduce the error a second time

@Gentle
Copy link
Author

Gentle commented Apr 3, 2024

I guess I'll bump to 19.0.1 ;)

Copy link
Member

@fitzgen fitzgen left a comment

Choose a reason for hiding this comment

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

Thanks! One thing to fix before we merge this.

ValType::ExternRef => Val::ExternRef(None),
ValType::FuncRef => Val::FuncRef(None),
ValType::Ref(ref_type) => {
if ref_type.matches(&RefType::EXTERNREF) {
Copy link
Member

Choose a reason for hiding this comment

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

Can you check whether ref_type.is_nullable() and return an error here ("cannot create a dummy value for a non-nullable reference type") if so? This will require making a few of these dummy_foo functions return Result<Foo>s.

Copy link
Author

Choose a reason for hiding this comment

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

was this the intended change?

src/dummy.rs Outdated
}

/// Construct a sequence of dummy values for the given types.
#[cfg(fuzzing)]
pub fn dummy_values(val_tys: impl IntoIterator<Item = ValType>) -> Vec<Val> {
val_tys.into_iter().map(dummy_value).collect()
val_tys
Copy link
Author

Choose a reason for hiding this comment

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

this is the only place where dummy_value is called

src/dummy.rs Outdated Show resolved Hide resolved
@Gentle
Copy link
Author

Gentle commented Apr 13, 2024

I run the fuzzer with RUST_BACKTRACE=1 cargo fuzz run --sanitizer none same_result -- -rss_limit_mb=4096, the default setting of 2048 errors out because some test cases are too big

otherwise I hope I got the dummy values part right this time :)

Copy link
Member

@fitzgen fitzgen left a comment

Choose a reason for hiding this comment

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

Looks great! Thanks!

@fitzgen fitzgen merged commit 8b1600c into bytecodealliance:main Apr 15, 2024
17 checks passed
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.

3 participants