3 ms·
While Rust can reduce the chance of these kinds of bugs, it cannot completely prevent them. For instance, the browser Javascript VM will most likely use some f
by cesarb 10y ago
While Rust can reduce the chance of these kinds of bugs, it cannot completely prevent them.
For instance, the browser Javascript VM will most likely use some form of JIT, which works by generating machine code at runtime, and then executing the generated code. Nothing in the Rust language can prevent a bug in the generated code from being exploitable.
And even within pure Rust code, developers can and will do unsafe tricks to get the last few percent points of speed (for instance, storing flags in the least significant bit of pointers). While Rust requires these parts to be marked with "unsafe" (which allows reviewers to focus on them), it cannot prevent bugs caused by these pieces of code.
- staticassertion 10y agoThis seems like a strawman. "Rust prevents these bugs", "Oh, but Rust doesn't prevent all bugs!".