Index: src/wasm/wasm-debug.cc |
diff --git a/src/wasm/wasm-debug.cc b/src/wasm/wasm-debug.cc |
index f942c921276433ed033d03517b2cea509479172f..2f3b83a3bf7d27458f443d9040a7c7df06e94085 100644 |
--- a/src/wasm/wasm-debug.cc |
+++ b/src/wasm/wasm-debug.cc |
@@ -178,7 +178,7 @@ class InterpreterHandle { |
#define CASE_ARG_TYPE(type, ctype) \ |
case type: \ |
DCHECK_EQ(param_size, sizeof(ctype)); \ |
- wasm_args[i] = WasmVal(ReadUnalignedValue<ctype>(arg_buf_ptr)); \ |
+ wasm_args[i] = WasmVal(*reinterpret_cast<ctype*>(arg_buf_ptr)); \ |
break; |
switch (sig->GetParam(i)) { |
CASE_ARG_TYPE(kWasmI32, uint32_t) |
@@ -189,7 +189,7 @@ class InterpreterHandle { |
default: |
UNREACHABLE(); |
} |
- arg_buf_ptr += param_size; |
+ arg_buf_ptr += RoundUpToMultipleOfPowOf2(param_size, 8); |
} |
uint32_t activation_id = StartActivation(frame_pointer); |
@@ -240,7 +240,7 @@ class InterpreterHandle { |
#define CASE_RET_TYPE(type, ctype) \ |
case type: \ |
DCHECK_EQ(1 << ElementSizeLog2Of(sig->GetReturn(0)), sizeof(ctype)); \ |
- WriteUnalignedValue<ctype>(arg_buffer, ret_val.to<ctype>()); \ |
+ *reinterpret_cast<ctype*>(arg_buffer) = ret_val.to<ctype>(); \ |
break; |
switch (sig->GetReturn(0)) { |
CASE_RET_TYPE(kWasmI32, uint32_t) |