wasm-micro-runtime/core/shared/utils
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
..
uncommon Enable Windows MinGW support (#1000) 2022-02-06 13:20:38 +08:00
bh_assert.c Fix bh_assert for 64-bit platforms (#2071) 2023-03-28 12:18:39 +08:00
bh_assert.h Fix bh_assert for 64-bit platforms (#2071) 2023-03-28 12:18:39 +08:00
bh_atomic.h Refine lock/unlock shared memory (#2682) 2023-10-31 11:46:03 +08:00
bh_bitmap.c Fix data/elem drop (#2747) 2023-11-18 08:50:16 +08:00
bh_bitmap.h Fix data/elem drop (#2747) 2023-11-18 08:50:16 +08:00
bh_common.c Remove unnecessary and extra zero length check in mem functions' macro (#2428) 2023-08-08 08:52:25 +08:00
bh_common.h Remove unnecessary and extra zero length check in mem functions' macro (#2428) 2023-08-08 08:52:25 +08:00
bh_hashmap.c Limit the minimal size of bh_hashmap (#2073) 2023-03-28 14:50:31 +08:00
bh_hashmap.h Limit the minimal size of bh_hashmap (#2073) 2023-03-28 14:50:31 +08:00
bh_list.c Apply clang-format for core/shared and product-mini files (#785) 2021-10-14 09:12:07 +08:00
bh_list.h Fix issue in multi-thread sample (#1458) 2022-09-07 12:56:50 +08:00
bh_log.c Upgrade version number to 1.1.2 (#1788) 2022-12-08 12:21:34 +08:00
bh_log.h Add bh_print_proc_mem() to dump memory info of current process (#1734) 2022-11-25 08:33:44 +08:00
bh_platform.h Move generic parts of wasm_suspend_flags.h to bh_atomic.h (#2393) 2023-07-27 21:37:23 +08:00
bh_queue.c Apply clang-format for core/shared and product-mini files (#785) 2021-10-14 09:12:07 +08:00
bh_queue.h Suppress the warnings when building with GCC11 (#1622) 2022-10-20 21:26:57 +08:00
bh_vector.c Clear compilation warnings on Windows (#1307) 2022-07-21 09:32:28 +08:00
bh_vector.h Enable lock for Vector to protect wasm-c-api read/write/extend operations (#1010) 2022-03-23 11:42:57 +08:00
gnuc.h Implement suspend flags as atomic variable (#2361) 2023-07-21 08:27:09 +08:00
runtime_timer.c Apply clang-format for core/shared and product-mini files (#785) 2021-10-14 09:12:07 +08:00
runtime_timer.h Suppress the warnings when building with GCC11 (#1622) 2022-10-20 21:26:57 +08:00
SConscript add porting codes of rt-thread (#494) 2021-01-14 11:26:35 +08:00
shared_utils.cmake re-org platform APIs, simplify porting process (#201) 2020-03-16 16:43:57 +08:00