It is true that mileage is a good proxy for finding bugs, but this is isomorphic to the fundamental differences between testing v. verification. You can prove absence of classes of bugs with verification. Obviously there can be other logic bugs in newer software. No question. The issue is the memory-corruption bugs in socket-facing daemons can have catastrophic consequences, especially in light of chaining kernel vulnerabilities which defeats the privilege drop that nginx does.
So I'd say it is about a more holistic risk-analysis not just handwaving "all code can have bugs, duh!"
A more holistic risk-analysis would also need to consider the fact that a high-performance webserver written in Rust may also have memory safety issue due to use of "unsafe" features or unsafe dependencies, may be affected by memory safety issues in the standard library, may also have catastrophic logic errors, may be more affect by supply chain risks due to the use of a language-level package manager, and may have a larger patch gap.
Which is like complaining that Python is unsafe because it is written in C.
That is a far smaller surface as seen by research into incorporating rust in Android leading to none of the high profile vulnerabilities C and C++ led to previously.
Not in the slightest. It's like pointing out that a Python script calling out to binaries written in C doesn't have the memory safety of Python's GC. Which is obviously the case, and if you're a serious developer it's a failure point you're very mindful of.
On the Android point, I remember those metrics were highly flawed and didn't account for the inequality of substructural type ergonomics in different contexts. You can get very nice metrics by rewriting things that fit to the grain of safe Rust, which gives you an inaccurate picture of how much unsafe code is "real world". LLMs have changed the field here, but it's worth pointing out that blog post you're referencing was more self-congratulatory marketing than serious science.
Also problematically, I remember it being highly misleading in that the actual observed result was lower severity in vulnerabilities, but a very minimal effect on the total number over all. That's certainly significant, but it wasn't how it presented itself, which is rather problematic if you expect people to take it seriously as objective research.
Measurements probably real, but not worth citing. It's not like on their own blog they're under usual academic journal pressures to overclaim results, p-hack, and engage in other misleading behaviors.
What specifically distinguishes the empirical research presented in Google’s blog posts, for example the one linked below, from your definition of research?
Research is not just making some plots and posting them on the internet. A proper scientific studies would need to be done much more carefully, if you want to have any chance to get meaningful results, because there is a lot which can go wrong at any level. This is something learned people learned the hard way in empirical sciences. In particular, in this setting I do not see how one could ever properly control for confounding factors. Such a study should also be peer reviewed. Then repeated by others. Also if there are commercial interests mixed-up this needs to be questioned carefully. Finally, I just note the data presented seems mostly about C++ not C, so is not clear how this applies to C. Not separating this would also already be an obvious methodological problem. This is also connected to the problem that the underlying data is not made available, and not properly described in sufficient detail. Etc. (Not a full list, just to make it clear this is not even remotely science).
A more holistic risk-analysis would also need to consider the fact that wearing seatbelts in motor vehicles still leaves drivers vulnerable to drive-by shootings, may be affected by massive boulders crashing on top of the vehicle, driving off a bridge, or gas explosions, and costs more to produce.
In my view, the Rust argument is more like that driving (in C) can not possible be safe because there is always the inherent risk of steering into an obstacle, so we have to abandon it completely and only use the local public rail system (which entirely eliminate this class of steering errors). But this is argument made based on the state of the technology in 1950s without considering that seatbelts and other modern techniques, driver tests, speed limits can make driving a lot safer (as seen today when compared to the 1950s).
Seatbelts are more comparable to activating bounds checking in C compared to switching to another language. because they are a minor inconvenience with a huge positive security effects, but do not eliminate all risk. Rust is more like switching to public rail system, because it does eliminate certain risks completely (all related to steering), but not others, and then also limits you in various way, so you may still need to use a car for the final meters (e.g. C or "unsafe" Rust).
And this comparison is consistent with the idea that the public rail system really is safer to use with regard to traffic accidents, so captures the idea that Rust actually has safety benefits. But IMHO the framing and marketing is highly misleading.
how does rust limit you? it seems to be one of the most versatile languages ever. it's genuinely used for everything from the linux kernel to webservers, desktop and mobile apps, even frontend ui in the browser. no other language has that usage (maybe swift?). saying rust is a rail system and c is a car makes zero sense, if anything rust is a flying car because it is used in situations where c is not, whereas rust is used everywhere c is used.
any serious engineering discipline eliminates the possibility of human error wherever possible, especially when it results in dangerous effects. and yet in software there are people who prefer exposing others to those dangerous effects because of a personal preference for a 50 year old tool.
In theory, that could be possible. In practice, there have been many many case studies demonstrating the opposite and not that many case studies demonstrating in favor of your argument.
> With those assurances we can focus more on how a change to our service will interact with other services or a customer's origin. We can develop features at a higher cadence and not be burdened by memory safety and hard to diagnose crashes.
> When crashes do occur an engineer needs to spend time to diagnose how it happened and what caused it. Since Pingora's inception we’ve served a few hundred trillion requests and have yet to crash due to our service code.
> In fact, Pingora crashes are so rare we usually find unrelated issues when we do encounter one. Recently we discovered a kernel bug soon after our service started crashing. We've also discovered hardware issues on a few machines, in the past ruling out rare memory bugs caused by our software even after significant debugging was nearly impossible.
The CVE counts for new parts of the Linux kernel written in Rust are much lower than the (recent) CVE counts for even mature, years old parts of the Linux kernel written in C, to say nothing of the historical record.
There is basically no meaningful part of the kernel written in Rust from which one could conclude this. There is now binder, but this was only recently merged and I am not sure what data there is about it (and how it would compare to new C code written with a focus on memory safety).
So I'd say it is about a more holistic risk-analysis not just handwaving "all code can have bugs, duh!"