Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[wasm2c] Add support for trap-handling memory sandboxing #1440

Closed
binji opened this issue May 26, 2020 · 1 comment
Closed

[wasm2c] Add support for trap-handling memory sandboxing #1440

binji opened this issue May 26, 2020 · 1 comment

Comments

@binji
Copy link
Member

binji commented May 26, 2020

Most Wasm engines use the CPU's hardware memory protection to handle wasm sandboxing; since wasm32 pointers are 32-bit, we can reserve 8GiB (33-bits, 32-bit index plus 32-bit offset) of address space for each memory object. All addresses outside the valid range will trap in the OS, which then can be handled and converted into a wasm trap.

We should add support for this to wasm2c output too.

@keithw
Copy link
Member

keithw commented May 19, 2022

Done in #1442

@keithw keithw closed this as completed May 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants