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