mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2025-05-11 20:21:11 +00:00
Fix memory size not updating after growing in interpreter (#2898)
This commit fixes linear memory size not updating after growing. This causes `memory.fill` to throw an exception after `memory.grow`.
This commit is contained in:
parent
4aee3cf14e
commit
ef0cd22119
|
@ -2149,7 +2149,11 @@ wasm_interp_call_func_bytecode(WASMModuleInstance *module,
|
|||
#if !defined(OS_ENABLE_HW_BOUND_CHECK) \
|
||||
|| WASM_CPU_SUPPORTS_UNALIGNED_ADDR_ACCESS == 0 \
|
||||
|| WASM_ENABLE_BULK_MEMORY != 0
|
||||
linear_mem_size = get_linear_mem_size();
|
||||
#if WASM_ENABLE_THREAD_MGR == 0
|
||||
linear_mem_size = memory->memory_data_size;
|
||||
#else
|
||||
linear_mem_size = GET_LINEAR_MEMORY_SIZE(memory);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -1917,7 +1917,11 @@ wasm_interp_call_func_bytecode(WASMModuleInstance *module,
|
|||
#if !defined(OS_ENABLE_HW_BOUND_CHECK) \
|
||||
|| WASM_CPU_SUPPORTS_UNALIGNED_ADDR_ACCESS == 0 \
|
||||
|| WASM_ENABLE_BULK_MEMORY != 0
|
||||
linear_mem_size = get_linear_mem_size();
|
||||
#if WASM_ENABLE_THREAD_MGR == 0
|
||||
linear_mem_size = memory->memory_data_size;
|
||||
#else
|
||||
linear_mem_size = GET_LINEAR_MEMORY_SIZE(memory);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user