Avoid initialize LLVM repeatedly (#1671)
Currently we initialize and destroy LLVM environment in aot_create_comp_context and aot_destroy_comp_context, which are called in wasm_module_load/unload, and the latter may be invoked multiple times, which leads to duplicated LLVM initialization/destroy and may result in unexpected behaviors. Move the LLVM init/destroy into runtime init/destroy to resolve the issue.
This commit is contained in:
@ -1642,9 +1642,11 @@ wasm_trap_new_internal(wasm_store_t *store,
|
||||
const char *error_info)
|
||||
{
|
||||
wasm_trap_t *trap;
|
||||
#if WASM_ENABLE_DUMP_CALL_STACK != 0
|
||||
wasm_instance_vec_t *instances;
|
||||
wasm_instance_t *frame_instance = NULL;
|
||||
uint32 i;
|
||||
#endif
|
||||
|
||||
if (!singleton_engine || !singleton_engine->stores
|
||||
|| !singleton_engine->stores->num_elems) {
|
||||
|
||||
Reference in New Issue
Block a user