Re:Death to C
by steveklabnik on Saturday May 02, 2015 @10:12AM
(#9477100)
Most of Rust's safety guarantees are at compile time, not at runtime, and so have no runtime overhead. ASan's docs claim a 2x slowdown.
That said, defense in depth is always nice. kmc got AFL working with Rust recently, and it's uncovered some things. Using an ASan-like tool to do some of the runtime stuff would be great to have.
> uncovered some things
Those were problems with the rust compiler or the binaries it generates?
Re:Death to C
by steveklabnik on Saturday May 02, 2015 @10:23AM
(#9477154)
Three things so far. Two in the parser, one in generated code:
- https://github.com/rust-lang/rust/issues/24276
Then I read this in TFA:
> Despite guaranteeing memory safety, Rust does not have a garbage collector or runtime, and one of the benefits of this is that Rust code can be called from C with no setup at all.
Maybe I should think about it as "you always enable ASan in your production binary"? That suits me just fine, if that's one of its major benefits. I will resolve today to follow up on Rust and try to learn more about it.