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

[Strings] Implement TODOs in the fuzzer #6416

Merged
merged 1 commit into from
Mar 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/tools/fuzzing/fuzzing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2468,9 +2468,14 @@ Expression* TranslateToFuzzReader::makeBasicRef(Type type) {
case HeapType::string:
return builder.makeStringConst(std::to_string(upTo(1024)));
case HeapType::stringview_wtf8:
return builder.makeStringAs(
StringAsWTF8, makeBasicRef(Type(HeapType::string, NonNullable)));
case HeapType::stringview_wtf16:
return builder.makeStringAs(
StringAsWTF16, makeBasicRef(Type(HeapType::string, NonNullable)));
case HeapType::stringview_iter:
WASM_UNREACHABLE("TODO: strings");
return builder.makeStringAs(
StringAsIter, makeBasicRef(Type(HeapType::string, NonNullable)));
Copy link
Member

Choose a reason for hiding this comment

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

Don't we have separate heap types for all the different stringref views and iterators?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, there are three cases here, stringview_wtf8, wtf16, iter - ? I'm not sure what else you expect to see, sorry.

Copy link
Member

Choose a reason for hiding this comment

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

Oh, I think I was confusing HeapType::string for the output type of the expression rather than the input type.

case HeapType::none:
case HeapType::noext:
case HeapType::nofunc:
Expand Down
Loading