Memory bugs are to be avoided, but are a small minority of the number of bugs total. Most bugs are just due to complexity. So “memory safety” is kind of a red herring; if you fix a small number of bugs by gaining memory safety, but in doing so increase friction too much, it is
-
-
easily a net loss, because the other 95% of bugs are harder to deal with. Our solution is to provide customizable metaprogramming techniques you can leverage to help with all 100% of bugs, as you feel is best for your own domain and program.
1 reply 0 retweets 7 likes -
Replying to @Jonathan_Blow @boribombo
Interesting! As someone who works in a highly logic-bug sensitive field (clinical analysis), I've found that having an advanced type system, incl. memory ownership, is almost always a benefit in reducing logic bugs, as well as memory bugs; have you had a different experience?
1 reply 0 retweets 4 likes -
Also: a recent post from the maintainer of curl seems to contradict these numbers. Is it possible your experience is not universal here?
1 reply 0 retweets 3 likes -
Replying to @NoraDotCodes @boribombo
I am just talking about the software we ship, though I suspect that if some team's bug load is mostly memory bugs, they are doing something wrong at a basic level. I don't see how memory ownership helps with logic bugs; they are pretty much orthogonal.
1 reply 0 retweets 3 likes -
Replying to @Jonathan_Blow @boribombo
First, let's stop speaking in the abstract. Here is the data on curl: https://timmmm.github.io/curl-vulnerabilities-rust/ … and here is Daniel's analysis: https://daniel.haxx.se/blog/2021/03/09/half-of-curls-vulnerabilities-are-c-mistakes/ … I'm open to the idea that the curl team is doing something fundamentally wrong, but that assertion would require some evidence.
1 reply 0 retweets 4 likes -
To your other point, I think working in a language with memory ownership strongly encourages a lot of patterns - context passing instead of global mutable state, "share memory by communicating", etc - that are possible but not encouraged in other languages.
1 reply 0 retweets 6 likes -
And, speaking about Rust - which I believe we are - coupling these idioms, ecosystem-wide and encouraged by the language, with a robust, powerful, and hard to screw up type system means that important invariants beyond memory ownership can be encoded and enforced easily.
2 replies 0 retweets 6 likes -
Replying to @NoraDotCodes @boribombo
I spent hours today arguing with Rust people today already, don't want to spend more time on this. You can see what I have previously written/filmed to know what I think on this. The upshot is, as said up the thread, I think there are more efficient ways to get more benefits.
2 replies 0 retweets 0 likes -
Replying to @Jonathan_Blow @boribombo
Okay, I won't take up more of your time. I'm excited to hear more about your ideas on this topic - new language research is always interesting, and I assume it is new, since I haven't heard you answer most of what I asked (so, I asked). I .await your paper with baited breath. :)
1 reply 0 retweets 0 likes
I willl say that I glanced at the curl page before closing it and the author does not appear to be talking about all bugs, but security vulnerabilities only, which are usually a small subset of all bugs, and where memory issues appear predominantly.
-
-
Replying to @Jonathan_Blow @boribombo
Interesting - that feels intuitively like it could be true, but I'm not sure I've ever seen data on whether or not security bugs are more or less likely to be memory-ownership related. Do you have some?
1 reply 0 retweets 0 likes -
Replying to @NoraDotCodes @Jonathan_Blow
@NoraDotCodes Classical security issues are often caused by out of bounds operations, but memory management bugs can also be exploited for content spoofing or malicious code execution by just forgetting to properly zeroing buffers/pointer variables after use1 reply 0 retweets 0 likes - Show replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.