summaryrefslogtreecommitdiff
path: root/src/tools/fuzzing
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2024-03-27 11:40:54 -0700
committerGitHub <noreply@github.com>2024-03-27 11:40:54 -0700
commitfafbb4c442d872de4e991ab37bd290f012678ff9 (patch)
tree654db1b0f9679a27ae5a1e2867537b8319772980 /src/tools/fuzzing
parent3d97d78dd807b1a68857e537af83c6fa6747bcc3 (diff)
downloadbinaryen-fafbb4c442d872de4e991ab37bd290f012678ff9.tar.gz
binaryen-fafbb4c442d872de4e991ab37bd290f012678ff9.tar.bz2
binaryen-fafbb4c442d872de4e991ab37bd290f012678ff9.zip
Fuzzer HeapType generator: Do not use string types if not allowed (#6447)
Diffstat (limited to 'src/tools/fuzzing')
-rw-r--r--src/tools/fuzzing/heap-types.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tools/fuzzing/heap-types.cpp b/src/tools/fuzzing/heap-types.cpp
index 5c948e44d..33a92b796 100644
--- a/src/tools/fuzzing/heap-types.cpp
+++ b/src/tools/fuzzing/heap-types.cpp
@@ -461,7 +461,7 @@ struct HeapTypeGeneratorImpl {
case HeapType::stringview_iter:
break;
case HeapType::none:
- if (rand.oneIn(10)) {
+ if (features.hasStrings() && rand.oneIn(10)) {
candidates.push_back(HeapType::stringview_wtf8);
candidates.push_back(HeapType::stringview_wtf16);
candidates.push_back(HeapType::stringview_iter);