mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2024-11-26 15:32:05 +00:00
Drop declarative elements on module instantiation (#3922)
This commit is contained in:
parent
62aca17279
commit
00c2aa10a8
|
@ -1905,7 +1905,9 @@ aot_instantiate(AOTModule *module, AOTModuleInstance *parent,
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
for (i = 0; i < module->table_init_data_count; i++) {
|
for (i = 0; i < module->table_init_data_count; i++) {
|
||||||
if (wasm_elem_is_active(module->table_init_data_list[i]->mode))
|
if (wasm_elem_is_active(module->table_init_data_list[i]->mode)
|
||||||
|
|| wasm_elem_is_declarative(
|
||||||
|
module->table_init_data_list[i]->mode))
|
||||||
bh_bitmap_set_bit(common->elem_dropped, i);
|
bh_bitmap_set_bit(common->elem_dropped, i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2467,7 +2467,8 @@ wasm_instantiate(WASMModule *module, WASMModuleInstance *parent,
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
for (i = 0; i < module->table_seg_count; i++) {
|
for (i = 0; i < module->table_seg_count; i++) {
|
||||||
if (wasm_elem_is_active(module->table_segments[i].mode))
|
if (wasm_elem_is_active(module->table_segments[i].mode)
|
||||||
|
|| wasm_elem_is_declarative(module->table_segments[i].mode))
|
||||||
bh_bitmap_set_bit(module_inst->e->common.elem_dropped, i);
|
bh_bitmap_set_bit(module_inst->e->common.elem_dropped, i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user