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

[GC][EH] Fuzz exnref in GC structs #7288

Merged
merged 13 commits into from
Feb 13, 2025
Merged

Conversation

kripken
Copy link
Member

@kripken kripken commented Feb 11, 2025

Most of the work here is avoiding shared and non-nullable exnref in
various places, as we cannot support those in the fuzzer (I don't see
a way to generate shared exnrefs, and non-nullable ones can be
created but not in global places, as the way to create them needs a
block and a try).

Some example output:

 (type $0 (struct (field (mut exnref)) (field (mut i64)) (field (mut v128))))
 (type $1 (sub (struct (field (ref null $1)) (field (mut i16)) (field (mut exnref)) (field (ref struct)))))
 (type $3 (sub final $1 (struct (field (ref null $3)) (field (mut i16)) (field (mut exnref)) (field (ref $2)))))

@kripken kripken requested review from tlively and aheejin February 11, 2025 21:19
Copy link
Member

@aheejin aheejin left a comment

Choose a reason for hiding this comment

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

LGTM % nits

src/tools/fuzzing/fuzzing.cpp Outdated Show resolved Hide resolved
Comment on lines +164 to +170
std::vector<HeapType> options{HeapType::func,
HeapType::ext,
HeapType::any,
HeapType::eq,
HeapType::i31,
HeapType::struct_,
HeapType::array};
Copy link
Member

Choose a reason for hiding this comment

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

Given that we check for features.hasExceptionHandling() for exn, don't we also need to check for features.hasGC() or something for these?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think this entire file is for fuzzing of heap types, so GC is assumed everywhere. This is a separate file from the main fuzzer.

@kripken kripken merged commit 7664807 into WebAssembly:main Feb 13, 2025
14 checks passed
@kripken kripken deleted the fuzz.exn.gc branch February 13, 2025 17:07
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.

2 participants