summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/tools/fuzzing.h2
-rw-r--r--src/wasm-builder.h2
2 files changed, 3 insertions, 1 deletions
diff --git a/src/tools/fuzzing.h b/src/tools/fuzzing.h
index 0a7128e3e..80945eb9e 100644
--- a/src/tools/fuzzing.h
+++ b/src/tools/fuzzing.h
@@ -375,6 +375,8 @@ private:
hasher->type = ensureFunctionType(getSig(hasher), &wasm)->name;
wasm.addExport(
builder.makeExport(hasher->name, hasher->name, ExternalKind::Function));
+ // Export memory so JS fuzzing can use it
+ wasm.addExport(builder.makeExport("memory", "0", ExternalKind::Memory));
}
void setupTable() {
diff --git a/src/wasm-builder.h b/src/wasm-builder.h
index 284608105..7d839357e 100644
--- a/src/wasm-builder.h
+++ b/src/wasm-builder.h
@@ -84,7 +84,7 @@ public:
auto* export_ = new Export();
export_->name = name;
export_->value = value;
- export_->kind = ExternalKind::Function;
+ export_->kind = kind;
return export_;
}