Skip to content

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

Merged
kripken merged 13 commits intoWebAssembly:mainfrom
kripken:fuzz.exn.gc
Feb 13, 2025
Merged

[GC][EH] Fuzz exnref in GC structs#7288
kripken merged 13 commits intoWebAssembly:mainfrom
kripken:fuzz.exn.gc

Conversation

@kripken
Copy link
Copy Markdown
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 aheejin and tlively February 11, 2025 21:19
Copy link
Copy Markdown
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

Comment thread src/tools/fuzzing/fuzzing.cpp Outdated
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
Copy Markdown
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
Copy Markdown
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.

Co-authored-by: Heejin Ahn <aheejin@gmail.com>
@kripken kripken merged commit 7664807 into WebAssembly:main Feb 13, 2025
@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