Clone data segments when specified with load args (#3463)
Follow-up on https://github.com/bytecodealliance/wasm-micro-runtime/pull/3389, specifically: https://github.com/bytecodealliance/wasm-micro-runtime/pull/3389#discussion_r1600872451 If we want to free the wasm binary buffer early, we need to clone the data segments into the module. That's because, in case of [passive data segments](https://webassembly.github.io/threads/core/syntax/modules.html#syntax-data), they can be referred during wasm execution.
This commit is contained in:
@ -563,7 +563,7 @@ WASM_API_EXTERN void wasm_shared_module_delete(own wasm_shared_module_t*);
|
||||
WASM_API_EXTERN bool wasm_module_set_name(wasm_module_t*, const char* name);
|
||||
WASM_API_EXTERN const char *wasm_module_get_name(wasm_module_t*);
|
||||
|
||||
WASM_API_EXTERN bool wasm_module_is_underlying_binary_freeable(const wasm_module_t *module, const struct wasm_instance_t* instance);
|
||||
WASM_API_EXTERN bool wasm_module_is_underlying_binary_freeable(const wasm_module_t *module);
|
||||
|
||||
|
||||
// Function Instances
|
||||
|
||||
Reference in New Issue
Block a user