3 ms·
We get that Zig doesn't have memory safe features. How much of a big deal is that anyway - what proportion of issues are caused by memory safety errors? And as
by fdsafdsfdsa 4y ago
We get that Zig doesn't have memory safe features. How much of a big deal is that anyway - what proportion of issues are caused by memory safety errors? And as an aside - how many Rust codebases use unsafe code?
(I don't know the answers to these - I'm a humble C programmer who intends to look at Zig soon).
- frankjr 4y ago> The Chromium project finds that around 70% of our serious security bugs are memory safety problems. https://www.chromium.org/Home/chromium-security/memory-safety/ https://www.chromium.org/Home/chromium-security/memory-safet...
- masklinn 4y agoSimilar observation at MS: https://msrc-blog.microsoft.com/2019/07/16/a-proactive-approach-to-more-secure-code/ https://msrc-blog.microsoft.com/2019/07/16/a-proactive-appro... > ~70% of the vulnerabilities Microsoft assigns a CVE each year continue to be memory safety issues That’s actually an understatement, on the graph with this caption 70% is closer to the low ebb / minimum in a given year (2012, 2018). During “bad” years (2009, 2014) it climbs as high as 80.
- AnIdiotOnTheNet 4y agoIt's worth noting when talking about how Zig isn't "memory safe" that comparisons to C aren't very illustrative because C almost goes out of its way to let the programmer shoot themselves in the foot. Zig was designed with a lot of features to prevent the kinds of errors C damn near encourages.