chakra-core / chakra-core/ChakraCore
[WebAssembly] Improve abort exception messages
- Dominant language
- JavaScript
- Stars
- 9.3k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
While porting mono to wasm, it's really unproductive to have to deal with this sort of errors:
```
wasm-function[744]:801: RuntimeError: function signature mismatch
RuntimeError: function signature mismatch
at _mini_init (wasm-function[744]:801)
at _mono_jit_init_version (wasm-function[415]:63)
at _mono_wasm_load_runtime (wasm-function[150]:78)
at Module._mono_wasm_load_runtime (mono.js:10812:51)
at ccall (mono.js:504:18)
at mono.js:512:12
at test.js:110:1
```
It would be AMAZING if a call_indirect failure message included: the table slot, the expected signature, the signature found and what function exists at the slot used.
This can be hidden under a debug flag that would be accessible under the release mode shell:
```
#~/.jsvu/ch -h
Usage: ch [-v|-version] [-h|-help|-?]
Note: [flaglist] is not supported in Release builds; try a Debug or Test build to enable these flags.
-v|-version Displays version info
-h|-help|-? Displays this help message
```
Contributor guide
Research direction
Start by locating ChakraCore's WebAssembly call_indirect failure path; the issue provides a Mono stack trace through mono.js and test.js but names no ChakraCore source file or test. Done means that, behind an available debug flag, failures report the table slot, expected and found signatures, and the function at that slot.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, wasm
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100