40 ms·
This is an OS problem, Rust won't save you there because you're going to use unsafe anyway, in Rust you would create wrappers for the unsafe part, they probably
by Thaxll 8y ago
This is an OS problem, Rust won't save you there because you're going to use unsafe anyway, in Rust you would create wrappers for the unsafe part, they probably do the same in C/C++ for OS, you don't use unsafe / low level things for higher part of the OS.
Redox is an OS written in Rust and had kernel panic with bad arguments passed to a user space program so ... ( it was a community challenge from 2 years ago )
I think Rust has a good vision for security but it's clearly not bullet proof as people seem to think, especially not on the low level fields like OS.
- wyldfire 8y ago> you're going to use unsafe anyway ... you don't use unsafe / low level things for higher part of the OS It seems as if you contradict yourself here. Or are you trying to suggest that Microsoft's bugs were confined to the "lower part of the OS"? > so ... So, what, exactly? Your point is not clear. Redox used Rust and held a challenge to find bugs in Redox -- which was succesful at uncovering bugs in Redox. Ergo, what? "memory bugs still exist when programming in Rust"? Or "We haven't completely extinguished this kind of bug, therefore we haven't improved over C." It sounds bogus when I try to guess at what you're implying, so please clarify. The whole unsafe escape hatch was designed to imbue the flexibility required to cover the design scope required for system software. Don't fault Rust for adding it. Credit Rust for Redox's stability after they did this challenge.
- Thaxll 8y agoMy point: - Redox is built in Rust and had serious memory bugs triggered by userspace applications, people claim that we should build OS in Rust because it's "memory" safe, in reality it's much more complex than that
- mmstick 8y agoIt did not have serious memory bugs. All of the unsafe code in Redox, of which only a small fraction is unsafe, is neatly compartmentalized so that it's easy to audit.
- Thaxll 8y agoIt was a year ago: https://gitlab.redox-os.org/redox-os/redox/issues/1136 https://gitlab.redox-os.org/redox-os/redox/issues/1136 https://gitlab.redox-os.org/redox-os/redox/issues/681 https://gitlab.redox-os.org/redox-os/redox/issues/681 And we're talking about a bunch of people randomly clicking / trying things, so imagine what's really inside Redox.