5 ms·
It is fascinating how despite the thousands and thousands of high profile memory related RCE vulnerabilities, how this community doesn't seem to like pointing t
by omeid2 3y ago
It is fascinating how despite the thousands and thousands of high profile memory related RCE vulnerabilities, how this community doesn't seem to like pointing the fact that C is an unsafe language.
- vlovich123 3y agoKeep in mind the other important difference for this project which is a microkernel design with most operations running in isolated user space processes/libraries. That also helps limit the ability to exploit vulnerabilities in one place to take over other parts of the system.
- snvzz 3y agoNot just the other important, but the most important. A safety-friendly language can help, but the system architecture is most important.
- tourmalinetaco 3y agoRust is only “safe” because by default you’re not allowed to do certain things. If you applied those same limitations to C it would be just as if not more safe. And the things you’re not allowed to do in “safe” Rust is required in various applications that C excels at, meaning that for Rust to do the same it has to be “unsafe”.
- bigstrat2003 3y agoNobody has ever denied that unsafe Rust code exists, so I don't know why people keep acting like it's some gotcha that invalidates the value of Rust. The point is that in Rust, it is clearly delimited where those unsafe operations are occurring, so you can focus on making sure those specific parts of your code are solid. In C, you have to be vigilant about your entire code base, not just a handful of blocks. Moreover, most Rust programs don't need to use unsafe at all, so those authors can rest easier.
- BirAdam 3y agoI am usually the first to say that Rust evangelists are annoying, but… your argument isn’t valid. That any tool can be dangerous when used wrongly enough is not an argument in favor of or against rust. Additionally, that any given tool might be better for a certain job over any other isn’t an argument for or against other tools more generally.
- empath-nirvana 3y ago> If you applied those same limitations to C it would be just as if not more safe. If frogs had wings, they wouldn't bump their butts when they hop. If you add all the security guarantees of Rust to C you would have something substantially similar to rust. As to your last point, it's very easy in rust to isolate those operations so you can just go over those with a fine tooth comb and not have to worry about unsafe stuff appearing everywhere in your code.
- snvzz 3y ago>pointing the fact that C is an unsafe language. The implication there is that Rust is safe. Reality is, it is not. Rust provides some tools C does not, which can help in writing safe programs. That is about it. In exchange, it is a relatively young language with all it implies. For instance, there are not yet any successful OSs written in Rust. Kudos to the authors for actually writing code to change this, instead of evangelizing Rust on HN.
- gpm 3y ago> For instance, there are not yet any successful OSs written in Rust. The rate at which new successful OS's come about is extremely low. Despite that, at least one OS in rust is being successfully deployed commercially today ('hubris', thanks to oxide computing), there are numerous reasonably advanced 'amateur' OS projects in rust (redox os being a reasonably polished example), and rust has begun finding it's way into the two most popular existing OSes (both the linux and windows kernels - I believe the windows kernel is farther along here). By any reasonable metric, rust has been wildly successful in the OS writing space. No doubt, in large part thanks to evangelizing by people who said "this is a reasonable thing to do".