-
Notifications
You must be signed in to change notification settings - Fork 590
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix memory size not updating #2898
Conversation
10431a1
to
7f8c1e5
Compare
This commit fixes linear memory size not updating after growing.
7f8c1e5
to
01c9514
Compare
@@ -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 | |||
#if WASM_ENABLE_THREAD_MGR == 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You may want to be consistent with what we do at the beginning of the function:
wasm-micro-runtime/core/iwasm/interpreter/wasm_interp_classic.c
Lines 1160 to 1164 in 4aee3cf
#if WASM_ENABLE_THREAD_MGR == 0 | |
linear_mem_size = memory->memory_data_size; | |
#else | |
linear_mem_size = GET_LINEAR_MEMORY_SIZE(memory); | |
#endif |
Also, similar changes need to be made for wasm_interp_fast.c
. See #2834
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the review. I just pushed another commit that makes the check consistent and applies the same fix to wasm_interp_fast.c
.
…liance#2898) This commit fixes linear memory size not updating after growing. This causes `memory.fill` to throw an exception after `memory.grow`.
This commit fixes linear memory size not updating after growing. This causes
memory.fill
to throw an exception aftermemory.grow
.