4 ms·
Way Cooler is designed from the ground up to be secure. Rust prevents Way Cooler from ever having a data race, dangling pointers, or a segfault. Large cla
by stephen123 9y ago
Way Cooler is designed from the ground up to be secure. Rust
prevents Way Cooler from ever having a data race, dangling
pointers, or a segfault. Large classes of security
vulnerabilities, such as from buffer overruns or use after
free, are a thing of the past.
haha nice selling point. Could add this to any app built with a memory managed language. =P
- vertex-four 9y agoWhile true, fact of the matter is that window managers (esp for Wayland, since the window manager now needs to contain a compositor and complete Wayland server implementation itself) need to be speedy enough and bind to enough libraries at a low level that most of them wind up being written in C, so this is a selling point vs the competition as it stands.
- jstimpfle 9y agoI would be interested to know if the performance can be noticed in (sensibly written) non-C window managers, but I doubt it. Probably the biggest reason for many of them being written in C is a cultural thing. I, for one, know only the C Xlib.
- fnord123 9y agoData races are possible in memory managed languages. And segfaults are thrown over the fence to the runtime. I'm sure anyone who has used Java in anger has seen segfaults. I certainly have. Personally, I think the statement is too strong. Rust is not immune to these things as the compiler is victim to all the realities of software development that all projects face. But it certainly does dramatically reduce the bug vectors.
- wuch 9y agoYeah, I suppose for the end user I doesn't matter if program stopped working because of segmentation fault or a panic. Though, if one were to choose on of those issues, then obviously runtime errors are preferable over memory-safety problems that might lead to an arbitrary code execution. BTW, in Java data races do not cause undefined-behaviour. In fact there is no undefined behaviour in Java at all (as specified at least, in practice as you and many others have observed things may work quite differently).
- mort96 9y agoWho said anything about UB? You can easily fuck up a parallel program in a nondeterministic may without UB. If two threads are in a deadlock, each waiting for the other thread to release a resource it needs, nobody cares that it wasn't caused by UB.
- the8472 9y agoJava as specified is memory-safe. It cannot cause application-visible segfaults (hotspot uses segfault handlers internally for some trickery but that's not really relevant here). Of course bugs in the JVM, native libraries or things like sun.misc.Unsafe might. But that's no different for rust, once you start using unsafe or use C libraries things might explode.
- aaron_m04 9y ago> Personally, I think the statement is too strong. Rust is not immune to these things as the compiler is victim to all the realities of software development that all projects face. But it certainly does dramatically reduce the bug vectors. The Rust compiler is extremely good at preventing undefined behavior in code that's not being written maliciously. You really can't encounter one by accident.
- wcummings 9y agoYeah also when was the last time a WM exploit was relevant?
- dom0 9y agoThe statement misses the point. Linux desktops are not terribly stable and something always crashes sooner or later; that's why all of them ship with watchdogs that restart crashed stuff quickly. The advantage of desktop components that don't crash is just that, they don't crash-and-restart.
- lscotte 9y ago> Linux desktops are not terribly stable and something always crashes sooner or later Simply not true, my Linux desktops have an uptime (system and desktop processes) of weeks to months. I've never seen a single Linux distro "ship with watchdogs" perhaps you can provide more details about what you mean.
- dom0 9y agoBoth KDE and Gnome automatically restart the desktop shell if it crashes. systemd includes a watchdog that instantly re-locks the session if the session locker crashes. D-Bus activated services are automatically restarted as well, when in use. There are probably more of these mechanisms.
- aaron_m04 9y agoI know Fedora 25 + GNOME will restart gnome-shell if it crashes. Not sure if it's implemented using a watchdog or if there's some listener for segfault events. I know this because I have an unfixed and reproducible crashing bug in gnome-shell: 1) unplug my 4K monitor from HDMI 2) start up the Display tool in system settings
- morganvachon 9y ago> Linux desktops are not terribly stable and something always crashes sooner or later One's experience on the Linux desktop depends on the distro choice, the applications used, and the hardware itself. I once had a Slackware box that ran non-stop as my daily driver with no crashes or odd behavior; I only rebooted it for kernel upgrades. I've had Debian and Ubuntu boxes that were crash-happy turds, but I've also had stable Debian-based machines. In my experience, the most stable machines are name-brand pro workstations that use fully open source GPU and audio drivers, running stable branches of conservative distros like Slackware. If you're running a bleeding edge distro like Arch on a self-built Kaby Lake or Ryzen beast with the latest and greatest GPU using closed source drivers, yeah you're going to have stability issues.