wasm-micro-runtime/core/iwasm/interpreter
YAMAMOTO Takashi 562a5dd1b6
Fix data/elem drop (#2747)
Currently, `data.drop` instruction is implemented by directly modifying the
underlying module. It breaks use cases where you have multiple instances
sharing a single loaded module. `elem.drop` has the same problem too.

This PR  fixes the issue by keeping track of which data/elem segments have
been dropped by using bitmaps for each module instances separately, and
add a sample to demonstrate the issue and make the CI run it.

Also add a missing check of dropped elements to the fast-jit `table.init`.

Fixes: https://github.com/bytecodealliance/wasm-micro-runtime/issues/2735
Fixes: https://github.com/bytecodealliance/wasm-micro-runtime/issues/2772
2023-11-18 08:50:16 +08:00
..
iwasm_interp.cmake Implement wasm mini loader and refine footprint of loader and runtime (#276) 2020-06-08 11:19:09 +08:00
SConscript add porting codes of rt-thread (#494) 2021-01-14 11:26:35 +08:00
wasm_interp_classic.c Fix data/elem drop (#2747) 2023-11-18 08:50:16 +08:00
wasm_interp_fast.c Fix data/elem drop (#2747) 2023-11-18 08:50:16 +08:00
wasm_interp.h Fix issue of restoring wasm operand stack (#1721) 2022-11-18 18:51:13 +08:00
wasm_loader.c Add more buffer boundary checks in wasm loader (#2734) 2023-11-09 08:42:05 +08:00
wasm_loader.h Fix build error when enable custom section without interpreter (#1229) 2022-06-15 18:14:39 +08:00
wasm_mini_loader.c Fix fast-interp "pre-compiled label offset out of range" issue (#2659) 2023-10-24 10:47:17 +08:00
wasm_opcode.h Fix data races in atomic wait/notify and interp goto table (#1971) 2023-02-22 11:43:49 +08:00
wasm_runtime.c Fix data/elem drop (#2747) 2023-11-18 08:50:16 +08:00
wasm_runtime.h Fix data/elem drop (#2747) 2023-11-18 08:50:16 +08:00
wasm.h Fix data/elem drop (#2747) 2023-11-18 08:50:16 +08:00