Index: src/wasm/wasm-interpreter.cc |
diff --git a/src/wasm/wasm-interpreter.cc b/src/wasm/wasm-interpreter.cc |
index 7e3127dd533220342e6ffed20725768558bec5f1..17ca6111e3a5e947570491f32a4102a5d7383440 100644 |
--- a/src/wasm/wasm-interpreter.cc |
+++ b/src/wasm/wasm-interpreter.cc |
@@ -1444,7 +1444,7 @@ class ThreadImpl : public WasmInterpreter::Thread { |
#define LOAD_CASE(name, ctype, mtype) \ |
case kExpr##name: { \ |
- MemoryAccessOperand operand(&decoder, code->at(pc)); \ |
+ MemoryAccessOperand operand(&decoder, code->at(pc), sizeof(ctype)); \ |
uint32_t index = Pop().to<uint32_t>(); \ |
size_t effective_mem_size = instance()->mem_size - sizeof(mtype); \ |
if (operand.offset > effective_mem_size || \ |
@@ -1476,7 +1476,7 @@ class ThreadImpl : public WasmInterpreter::Thread { |
#define STORE_CASE(name, ctype, mtype) \ |
case kExpr##name: { \ |
- MemoryAccessOperand operand(&decoder, code->at(pc)); \ |
+ MemoryAccessOperand operand(&decoder, code->at(pc), sizeof(ctype)); \ |
WasmVal val = Pop(); \ |
uint32_t index = Pop().to<uint32_t>(); \ |
size_t effective_mem_size = instance()->mem_size - sizeof(mtype); \ |