Skip to content
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

builtin-libc: Fix function prototype for wasm_runtime_module_realloc #3702

Merged
merged 1 commit into from
Aug 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions core/iwasm/libraries/libc-builtin/libc_builtin_wrapper.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
void
wasm_runtime_set_exception(wasm_module_inst_t module, const char *exception);

uint32
uint64
no1wudi marked this conversation as resolved.
Show resolved Hide resolved
wasm_runtime_module_realloc(wasm_module_inst_t module, uint64 ptr, uint64 size,
void **p_native_addr);

Expand Down Expand Up @@ -683,9 +683,12 @@ calloc_wrapper(wasm_exec_env_t exec_env, uint32 nmemb, uint32 size)
static uint32
realloc_wrapper(wasm_exec_env_t exec_env, uint32 ptr, uint32 new_size)
{
uint64 ret_offset = 0;
wasm_module_inst_t module_inst = get_module_inst(exec_env);

return wasm_runtime_module_realloc(module_inst, ptr, new_size, NULL);
ret_offset = wasm_runtime_module_realloc(module_inst, ptr, new_size, NULL);
bh_assert(ret_offset < UINT32_MAX);
return (uint32)ret_offset;
}

static void
Expand Down
Loading