4 ms·
Memory safety bugs are currently being introduced to the Linux kernel faster than they are being fixed. I assume this is true for all major projects but for Lin
by bjackman 3y ago
Memory safety bugs are currently being introduced to the Linux kernel faster than they are being fixed. I assume this is true for all major projects but for Linux there's hard evidence for this:
https://syzkaller.appspot.com/upstream/graph/bugs https://syzkaller.appspot.com/upstream/graph/bugs
So, yes, all bugs can be fixed. And yes, the world produces enough food to feed the entire population. But people are still going hungry.
- IshKebab 3y agoAll the more reason to switch to Rust surely?
- bjackman 3y agoYep that's what I'm saying
- hgs3 3y ago> Memory safety bugs are currently being introduced to the Linux kernel faster than they are being fixed. I don't understand where all these memory bugs are coming from. Are programmers not testing their code? Are they not running sanitizers, fuzzers, and static analysis? Switching programming languages isn't going to fix broken development process.
- charcircuit 3y agoMemory bugs turning into compile errors will make it harder to overlook as uncompilable code is really hard to check in to most projects.
- wavemode 3y agoThe entire point of Rust is that even in the most critical projects with the best tools and very experienced programmers, writing memory-safe C code in complex systems is extremely difficult. Even C++ is at least somewhat better, with smart pointers and RAII.
- bjackman 3y agoThe Linux kernel development process is indeed broken. Fixing that would reduce the discrepancy between the rate of new bugs and the rate of fixes. This needs to be done, C is not going away any time soon. But while we are writing C we will be creating new bugs faster than we can fix them. We will never get 100% fuzzing coverage. Nor can sanitizers catch every bug. As you suggested though, static analysis has lots of scope for solutions. The best static analyzer around is a little thing called rustc :)
- rcxdude 3y agothe median contributor to Linux is an overworked driver developer (who may not have much software development experience at all) who is throwing stuff at the wall to try to get something to work on their machine, often with inaccurate or incomplete documentation (even or especially if they work for the company making the hardware they are writing a driver for). It's a swamp of subpar C code once you get outside the core subsystems. And yes, there are a lot of people throwing various analysis tools at the kernel to try to catch these, but the tools are quite noisy, and proper testing is hard without the relevant hardware.
- PoignardAzur 3y agoI think GP meant "1 would be worse".
- deleted 3y ago[deleted]