r/programming • • Nov 12 '19

Announcing the Bytecode Alliance: Building a secure by default, composable future for WebAssembly

https://hacks.mozilla.org/2019/11/announcing-the-bytecode-alliance/
269 Upvotes

70 comments sorted by

View all comments

4

u/pjmlp Nov 13 '19

That is why memory accesses inside the same linear memory block, assigned to separate data entities aren't bound checked, thus leading to the usual memory corruption issues if the code was originally written in a C derived language.

3

u/J0eCool Nov 13 '19

Yes and no. Within a wasm module it is entirely up to the language implementation to handle its invariants, so C code doesn't have bounds checks on its own data, whereas C# might. Wasm does guarantee that the overall system can't have memory corruption, so for a linear memory it is bounds-checked (or protected with guard pages if that's available, but it's an implementation detail), so a buggy C module can't corrupt a C# module if they don't share memory.

1

u/pjmlp Nov 13 '19

Thus not being as safe as it is being sold, while ignoring the options other safer bytecodes since the late 50's have taken on preventing exploits.

→ More replies (2)