summaryrefslogtreecommitdiff
path: root/src/tools/fuzzing.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/fuzzing.h')
-rw-r--r--src/tools/fuzzing.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/tools/fuzzing.h b/src/tools/fuzzing.h
index 6aa0764f1..b17be8afe 100644
--- a/src/tools/fuzzing.h
+++ b/src/tools/fuzzing.h
@@ -29,6 +29,7 @@ high chance for set at start of loop
#include <ir/find_all.h>
#include <ir/literal-utils.h>
#include <ir/manipulation.h>
+#include "ir/memory-utils.h"
#include <ir/utils.h>
namespace wasm {
@@ -254,9 +255,7 @@ private:
}
void setupMemory() {
- wasm.memory.exists = true;
- // use one page
- wasm.memory.initial = wasm.memory.max = 1;
+ MemoryUtils::ensureExists(wasm.memory);
// init some data
wasm.memory.segments.emplace_back(builder.makeConst(Literal(int32_t(0))));
auto num = upTo(USABLE_MEMORY * 2);