Index: test/cctest/wasm/wasm-run-utils.h |
diff --git a/test/cctest/wasm/wasm-run-utils.h b/test/cctest/wasm/wasm-run-utils.h |
index f85f4ca3e2ccec4cd5bdde5371e9128d69c366e6..64e801d8e267f375b96e6d3f6d92b89b448466ff 100644 |
--- a/test/cctest/wasm/wasm-run-utils.h |
+++ b/test/cctest/wasm/wasm-run-utils.h |
@@ -105,8 +105,10 @@ class TestingModule : public ModuleEnv { |
void ChangeOriginToAsmjs() { module_.origin = kAsmJsOrigin; } |
byte* AddMemory(uint32_t size) { |
+ CHECK(!module_.has_memory); |
CHECK_NULL(instance->mem_start); |
CHECK_EQ(0, instance->mem_size); |
+ module_.has_memory = true; |
instance->mem_start = reinterpret_cast<byte*>(malloc(size)); |
CHECK(instance->mem_start); |
memset(instance->mem_start, 0, size); |