Add native-stack-overflow sample (#3321)
This is a test code to examine native stack overflow detection logic.
The current output on my environment (macOS amd64):
```shell
====== Interpreter
stack size | fail? | leak? | exception
---------------------------------------------------------------------------
0 - 14704 | failed | leaked | Exception: native stack overflow
14704 - 17904 | failed | ok | Exception: native stack overflow
17904 - 24576 | ok | ok |
====== AOT
stack size | fail? | leak? | exception
---------------------------------------------------------------------------
0 - 18176 | failed | leaked | Exception: native stack overflow
18176 - 24576 | ok | ok |
====== AOT WAMR_DISABLE_HW_BOUND_CHECK=1
stack size | fail? | leak? | exception
---------------------------------------------------------------------------
0 - 1968 | failed | ok | Exception: native stack overflow
1968 - 24576 | ok | ok |
```
This is a preparation to work on relevant issues, including:
https://github.com/bytecodealliance/wasm-micro-runtime/issues/3325
https://github.com/bytecodealliance/wasm-micro-runtime/issues/3320
https://github.com/bytecodealliance/wasm-micro-runtime/issues/3314
https://github.com/bytecodealliance/wasm-micro-runtime/issues/3297
This commit is contained in:
12
samples/native-stack-overflow/run.sh
Executable file
12
samples/native-stack-overflow/run.sh
Executable file
@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "====== Interpreter"
|
||||
out/native-stack-overflow out/wasm-apps/testapp.wasm
|
||||
|
||||
echo
|
||||
echo "====== AOT"
|
||||
out/native-stack-overflow out/wasm-apps/testapp.wasm.aot
|
||||
|
||||
echo
|
||||
echo "====== AOT WAMR_DISABLE_HW_BOUND_CHECK=1"
|
||||
out/native-stack-overflow.WAMR_DISABLE_HW_BOUND_CHECK out/wasm-apps/testapp.wasm.aot.bounds-checks
|
||||
Reference in New Issue
Block a user