summaryrefslogtreecommitdiff
path: root/src/tools/fuzzing/fuzzing.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/fuzzing/fuzzing.cpp')
-rw-r--r--src/tools/fuzzing/fuzzing.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/tools/fuzzing/fuzzing.cpp b/src/tools/fuzzing/fuzzing.cpp
index 2b776144d..c1625d726 100644
--- a/src/tools/fuzzing/fuzzing.cpp
+++ b/src/tools/fuzzing/fuzzing.cpp
@@ -433,6 +433,15 @@ void TranslateToFuzzReader::setupGlobals() {
}
void TranslateToFuzzReader::setupTags() {
+ // As in modifyInitialFunctions(), we can't allow tag imports as it would trap
+ // when the fuzzing infrastructure doesn't know what to provide.
+ for (auto& tag : wasm.tags) {
+ if (tag->imported()) {
+ tag->module = tag->base = Name();
+ }
+ }
+
+ // Add some random tags.
Index num = upTo(3);
for (size_t i = 0; i < num; i++) {
addTag();