mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2025-02-06 06:55:07 +00:00
Check passive mode in fast-jit table.init (#3031)
Reported in https://github.com/bytecodealliance/wasm-micro-runtime/issues/3021.
This commit is contained in:
parent
bb053e3a2d
commit
b3aaf2abc0
|
@ -112,6 +112,9 @@ wasm_init_table(WASMModuleInstance *inst, uint32 tbl_idx, uint32 elem_idx,
|
|||
if (bh_bitmap_get_bit(inst->e->common.elem_dropped, elem_idx))
|
||||
goto out_of_bounds;
|
||||
|
||||
if (!wasm_elem_is_passive(inst->module->table_segments[elem_idx].mode))
|
||||
goto out_of_bounds;
|
||||
|
||||
bh_memcpy_s((uint8 *)tbl + offsetof(WASMTableInstance, elems)
|
||||
+ dst_offset * sizeof(uint32),
|
||||
(uint32)((tbl_sz - dst_offset) * sizeof(uint32)),
|
||||
|
|
Loading…
Reference in New Issue
Block a user