Apex › Systems & OS

How WebAssembly sandboxes untrusted code

How a browser runs a downloaded, untrusted program at near-native speed without letting it touch your machine. The module’s whole world is one bounded array (linear memory): every load/store is a bounds-checked index into it, so it has no pointers into host memory; the bytecode is type-checked before it runs; and it has zero ambient authority — only the functions you import. Real WASM opcodes and a real bounds-checked memory: slide the address and watch an out-of-bounds access trap at the sandbox boundary.

More in Systems & OS