Skip to content

Commit f21e3f3

Browse files
committed
Drop declarative elements on module instantiation
1 parent f1d03db commit f21e3f3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

core/iwasm/interpreter/wasm_runtime.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2467,7 +2467,8 @@ wasm_instantiate(WASMModule *module, WASMModuleInstance *parent,
24672467
goto fail;
24682468
}
24692469
for (i = 0; i < module->table_seg_count; i++) {
2470-
if (wasm_elem_is_active(module->table_segments[i].mode))
2470+
if (wasm_elem_is_active(module->table_segments[i].mode) ||
2471+
wasm_elem_is_declarative(module->table_segments[i].mode))
24712472
bh_bitmap_set_bit(module_inst->e->common.elem_dropped, i);
24722473
}
24732474
}

0 commit comments

Comments
 (0)