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
This commit is contained in:
@ -444,6 +444,12 @@ jobs:
|
||||
cmake --build . --config Release --parallel 4
|
||||
./iwasm wasm-apps/no_pthread.wasm
|
||||
|
||||
- name: Build Sample [shared-module]
|
||||
run: |
|
||||
cd samples/shared-module
|
||||
./build.sh
|
||||
./run.sh
|
||||
|
||||
test:
|
||||
needs:
|
||||
[
|
||||
|
||||
6
.github/workflows/compilation_on_macos.yml
vendored
6
.github/workflows/compilation_on_macos.yml
vendored
@ -327,3 +327,9 @@ jobs:
|
||||
cmake ..
|
||||
cmake --build . --config Release --parallel 4
|
||||
./iwasm wasm-apps/no_pthread.wasm
|
||||
|
||||
- name: Build Sample [shared-module]
|
||||
run: |
|
||||
cd samples/shared-module
|
||||
./build.sh
|
||||
./run.sh
|
||||
|
||||
6
.github/workflows/nightly_run.yml
vendored
6
.github/workflows/nightly_run.yml
vendored
@ -501,6 +501,12 @@ jobs:
|
||||
cmake ..
|
||||
cmake --build . --config Release --parallel 4
|
||||
./iwasm wasm-apps/no_pthread.wasm
|
||||
|
||||
- name: Build Sample [shared-module]
|
||||
run: |
|
||||
cd samples/shared-module
|
||||
./build.sh
|
||||
./run.sh
|
||||
test:
|
||||
needs:
|
||||
[
|
||||
|
||||
Reference in New Issue
Block a user