From efac82f1719e1a7ef4f6e87de4ef7f68a10d1f28 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Wed, 27 Mar 2024 09:41:46 -0700 Subject: [PATCH 1/3] fix --- src/tools/fuzzing/fuzzing.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/tools/fuzzing/fuzzing.cpp b/src/tools/fuzzing/fuzzing.cpp index 168983b8595..a0106136a74 100644 --- a/src/tools/fuzzing/fuzzing.cpp +++ b/src/tools/fuzzing/fuzzing.cpp @@ -2639,15 +2639,16 @@ Expression* TranslateToFuzzReader::makeBasicRef(Type type) { String::convertWTF8ToWTF16(wtf16, wtf8.str()); return builder.makeStringConst(wtf16.str()); } - case HeapType::stringview_wtf8: - return builder.makeStringAs( - StringAsWTF8, makeBasicRef(Type(HeapType::string, NonNullable))); case HeapType::stringview_wtf16: + // We fully support wtf16 strings. return builder.makeStringAs( StringAsWTF16, makeBasicRef(Type(HeapType::string, NonNullable))); + case HeapType::stringview_wtf8: case HeapType::stringview_iter: - return builder.makeStringAs( - StringAsIter, makeBasicRef(Type(HeapType::string, NonNullable))); + // We do not have interpreter support for wtf8 and iter, so emit something + // that does not return, with a block that casts to the type the parent + // expects. + return builder.makeBlock({ builder.makeUnreachable() }, type); case HeapType::none: case HeapType::noext: case HeapType::nofunc: From dd5f9243c73ef93876250f6434abc17569f6242c Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Wed, 27 Mar 2024 09:43:40 -0700 Subject: [PATCH 2/3] format --- src/tools/fuzzing/fuzzing.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/fuzzing/fuzzing.cpp b/src/tools/fuzzing/fuzzing.cpp index a0106136a74..394365bf12e 100644 --- a/src/tools/fuzzing/fuzzing.cpp +++ b/src/tools/fuzzing/fuzzing.cpp @@ -2648,7 +2648,7 @@ Expression* TranslateToFuzzReader::makeBasicRef(Type type) { // We do not have interpreter support for wtf8 and iter, so emit something // that does not return, with a block that casts to the type the parent // expects. - return builder.makeBlock({ builder.makeUnreachable() }, type); + return builder.makeBlock({makeUnreachable()}, type); case HeapType::none: case HeapType::noext: case HeapType::nofunc: From 6c243dd63b615ccfa03820b3f6b0981e9e929b19 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Wed, 27 Mar 2024 10:30:03 -0700 Subject: [PATCH 3/3] fix --- src/tools/fuzzing/fuzzing.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/fuzzing/fuzzing.cpp b/src/tools/fuzzing/fuzzing.cpp index 394365bf12e..e20333500bc 100644 --- a/src/tools/fuzzing/fuzzing.cpp +++ b/src/tools/fuzzing/fuzzing.cpp @@ -2648,7 +2648,7 @@ Expression* TranslateToFuzzReader::makeBasicRef(Type type) { // We do not have interpreter support for wtf8 and iter, so emit something // that does not return, with a block that casts to the type the parent // expects. - return builder.makeBlock({makeUnreachable()}, type); + return builder.makeBlock({_makeunreachable()}, type); case HeapType::none: case HeapType::noext: case HeapType::nofunc: