5 ms·
> Crash logs are a different beast. I was under the impression that Firefox was written in Rust. Doesn't this eliminate crashes? Rust is a safe language after
by ihatepython 4y ago
> Crash logs are a different beast.
I was under the impression that Firefox was written in Rust. Doesn't this eliminate crashes? Rust is a safe language after all. There should not be any crash logs with Rust.
- smw 4y agoVery small (but important) parts of firefox are written in Rust
- cpeterso 4y agoAnd even if Firefox was written in 100% Rust, Rust can still panic for logic errors. And system libraries have their own bugs and crashes that can bring down Firefox.
- steveklabnik 4y agoIt is 9.5% of the total code base, that’s even counting things like tests. I wouldn’t personally call that “very small” but ymmv. That also said your parent equating memory safety to “no crashes” is also not correct. A process can exit early while never violating memory safety.
- Karellen 4y agoIt depends a bit on your definition of "crash". Rust has a `panic!()` macro which will hard-terminate the program and log a stack trace in what is functionally equivalent to a crash. It can be called in various scenarios... including out-of-memory situations (like the ones being addressed in the fine article and this thread).
- colejohnson66 4y agoIs this satire? Rust eliminates memory errors such as use-after-free. Unlike C and C++, `myVec[usize::MAX]` will `panic!` if `myVec` isn't actually that large.