bytecodealliance / bytecodealliance/StarlingMonkey
Silent failure when exceding the call stack limit in async handlers
- Dominant language
- C
- Stars
- 288
- Forks
- 57
- PR merge metrics
- No merged PRs in 30d
Description
In non async code, when overrunning the stack, we get a clear error. But when the code is async, the code fails silently.
Given the following code:
```javascript
addEventListener('fetch', () => {
foo();
});
function foo() {
foo();
}
```
We get:
```shell
stderr [0] :: Exception while Exception in event listener for fetch
stderr [0] :: component.js:6:5 InternalError: too much recursion
```
But when making the fetch event handler async, the component just fails silently.
```javascript
addEventListener('fetch', async () => {
foo();
});
function foo() {
foo();
}
```
The component fails, but there's no output to stderr at all.
This was happening somewhere deep in a library of a component I was trying to debug, but since there was no error it was really hard to figure out why the component shuts down mid execution
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.