Programming languages: How Google is improving C++ memory safety

Google’s Chrome team is looking at heap scanning to reduce memory-related security flaws in Chrome’s C++ codebase, but the technique creates a toll on memory — except when newer Arm hardware is used.   

Google can’t just rip and replace Chromium’s existing C++ code with memory safer Rust, but it is working on ways to improve the memory safety of C++ by scanning heap allocated memory. The catch is that it’s expensive on memory and for now only experimental.

Google and Microsoft are major users of and contributors to the fast programming language C++, which is used in projects like  Chromium, Windows, the Linux kernel, and Android. There is growing interest in using Rust because of its memory safety guarantees.  

But switching wholesale from C++ in Chrome to a language like Rust simply can’t happen in the near term. 

“While there is appetite for different languages than C++ with stronger memory safety guarantees, large codebases such as Chromium will use C++ for the foreseeable future,” explain Anton Bikineev, Michael Lippautz and Hannes Payer of Chrome’s security team.   

Given this status, Chrome engineers have found ways to make C++ safer to reduce memory-related security flaws such as buffer overflow and use-after free (UAF), which

Read More: https://www.zdnet.com/article/programming-languages-how-google-is-improving-c-memory-safety/#ftag=RSSbaffb68