Add wasm_runtime_detect_native_stack_overflow_size (#3355)

- Add a few API (https://github.com/bytecodealliance/wasm-micro-runtime/issues/3325)
   ```c
   wasm_runtime_detect_native_stack_overflow_size
   wasm_runtime_detect_native_stack_overflow
   ```
- Adapt the runtime to use them
- Adapt samples/native-stack-overflow to use them
- Add a few missing overflow checks in the interpreters
- Build and run the sample on the CI
This commit is contained in:
YAMAMOTO Takashi
2024-04-26 17:00:58 +09:00
committed by GitHub
parent 1b5ff93656
commit 410ee580ae
14 changed files with 201 additions and 53 deletions

View File

@ -491,6 +491,13 @@ jobs:
./iwasm wasm-apps/trap.aot | grep "#" > call_stack_aot.txt
bash -x ../symbolicate.sh
- name: Build Sample [native-stack-overflow]
run: |
cd samples/native-stack-overflow
./build.sh
./run.sh test1
./run.sh test2
test:
needs:
[

View File

@ -379,3 +379,12 @@ jobs:
./iwasm wasm-apps/trap.wasm | grep "#" > call_stack.txt
./iwasm wasm-apps/trap.aot | grep "#" > call_stack_aot.txt
bash -x ../symbolicate.sh
# skip on arm64 (macos-14) for now
- name: Build Sample [native-stack-overflow]
if: matrix.os != 'macos-14'
run: |
cd samples/native-stack-overflow
./build.sh
./run.sh test1
./run.sh test2

View File

@ -548,6 +548,13 @@ jobs:
./build.sh
./run.sh
- name: Build Sample [native-stack-overflow]
run: |
cd samples/native-stack-overflow
./build.sh
./run.sh test1
./run.sh test2
- name: Build Sample [native-lib]
run: |
mkdir build && cd build
@ -567,6 +574,7 @@ jobs:
python3 ./sample_test_run.py $(pwd)/out
exit $?
working-directory: ./wamr-app-framework/samples/simple
test:
needs:
[