4 ms·
And what about, for example, those government contractors who are in the same position as you: they have a large C++ codebase that currently works, and is too b
by natemcintosh 2y ago
And what about, for example, those government contractors who are in the same position as you: they have a large C++ codebase that currently works, and is too big to re-write in rust? Now they're being asked to make it safer. How will they do that with the "existing C++ process"?
- pizlonator 2y agoThey can use Fil-C++ and then they get memory safety without any rewrites.
- moregrist 2y agoThe funny thing about government funding is that it may be easier to secure capital for a Rust rewrite than for ongoing maintenance to add static lifetimes and other safety features to an existing C++ codebase. Legislatures seem a lot more able to allocate large pots of money for major discrete projects than to guarantee an ongoing stream of revenue to a continuing project.
- jart 2y agoDidn't Project Zero publish a blog post a few months ago, saying that old code isn't your security problem? They said it's new code you have to worry about. Zero also had copious amounts of data to demonstrate their point. In any case, if you really want to rewrite C++ in Rust, LLMs are fantastic at doing that. They're not really good yet at writing a new giant codebase from first principles. But if you give them something that already exists and ask them to translate it into a different language, oftentimes the result works for me on the first try. Even if it's hundreds of lines long.
- SkiFire13 2y agoThe issue is that newer code often needs to communicate with older code, and interfacing C++ and Rust is not trivial.
- fulafel 2y agoA link would be helpful, but at face value: of course old code vulnerabilities are still a problem. Vulnerabilities in old code make the headlines all the time.
- jart 2y agoIt was difficult to dig up, but I found it for you. https://security.googleblog.com/2024/09/eliminating-memory-safety-vulnerabilities-Android.html https://security.googleblog.com/2024/09/eliminating-memory-s... Also headlines do not accurately model reality. The news only reports on things that are newsworthy. It's comparatively rare that we'll discover new vulnerabilities in old code that's commonly used. That's what makes it newsworthy.
- fulafel 2y agoThanks. It's an interesting analysis around the "vulnerabilities decay exponentially" model, discussing how there are more vulnerabilities to be found in new code than old code given equal attention.
- jesse__ 2y agoYeah I remember reading that post about bugs over time. IIRC 5 years was the time it takes for most bugs to get ferreted out.