YAMAMOTO Takashi
3e5361f76d
samples/native-stack-overflow: Examine native functions with signature ( #3382 )
...
Note: wamrc chooses different methods to call native functions
with and without signatures.
2024-05-03 09:16:35 +08:00
YAMAMOTO Takashi
410ee580ae
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
2024-04-26 16:00:58 +08:00
YAMAMOTO Takashi
a36c7d5aa9
Random improvements to samples/native-stack-overflow ( #3353 )
2024-04-25 11:22:08 +08:00
YAMAMOTO Takashi
d6e8d224ce
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
2024-04-19 15:49:09 +08:00