cloudflare / cloudflare/workers-rs

Consider extending panic recovery to all Wasm critical errors

Open
#826 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
Rust
Stars
3.7k
Forks
429
Avg merge
20h 28m
Merged PRs (30d)
7

Description

### Is there an existing issue for this?

- [x] I have searched the existing issues

### Description

The new panic recovery system recovers only on explicit Rust pancis.

There are other errors that would not trigger this recovery:
* Stack size exceeded
* Memory access out of bounds
* could not allocate memory
* unreachable

It could be possible to also catch these cases and similarly issue a Wasm VM reset internally, by wrapping all top-level invocations with these error handlers.

This would be a bit more invasive than the panic handler work though, so should only be investigated if we are seeing other errors of this type transitioning Wasm into an invalid state.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.