shared heap: Fix some issues and add basic unit test case (#3801)

Fix some issues and add basic unit test case for shared heap feature.

Signed-off-by: wenlingyun1 <wenlingyun1@xiaomi.com>
This commit is contained in:
WenLY1
2024-09-20 14:24:38 +08:00
committed by GitHub
parent 5e20cf383e
commit 4dacef2d60
11 changed files with 332 additions and 56 deletions

View File

@ -31,8 +31,10 @@ shared_free_wrapper(wasm_exec_env_t exec_env, void *ptr)
{
wasm_module_inst_t module_inst = get_module_inst(exec_env);
if (!validate_native_addr(ptr, (uint64)sizeof(uint32)))
if (!validate_native_addr(ptr, (uint64)sizeof(uintptr_t))) {
LOG_WARNING("Invalid app address");
return;
}
module_shared_free(addr_native_to_app(ptr));
}