3 ms·
Well the article did mention it was in an undafe block
by gfna 10mo ago
Well the article did mention it was in an undafe block
- greatgib 10mo ago1) unsafe block still of "rust" code that rewritten in "rust" to be safe compared to previous C code. 2) Maybe there is no other way than use "unsafe" block sometimes in "rust", so is Rust a lie?
- AndrewDucker 10mo agoRust constrains the code that can do unsafe things to small blocks, greatly reducing the area in which they can happen. Unlike C, where the whole of the code is unsafe.
- gitaarik 10mo agoI imagine for some very low level kernel stuff, you might want to turn off Rust's safety features because they get in the way, make things less efficient or something. But then when you do you should really know what you're doing. The fact that this bug is because of "unsafe" Rust usage actually affirms the language's safety when using "safe" code. Although with "memory safe" code you can of course still fuck up lots of other things.