Comment

Comment by mathiasgredal

I suspect that the solution to unsafe languages like C/C++ will end being a small sanitizer runtime like CFI(https://dslab.epfl.ch/research/cpi/), that also supports some form of extended MTE, for memory safety.

For hot parts of the code that the sanitizer can guarantee is safe, either due to it being trivial or with annotations(https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2023/p27...), it can safely exclude these checks to limit performance impact.

This seems much more realistic than e.g. Microsoft rewriting Excel in Rust with bug for bug compatibility. It would also benefit Rust code, that has sections marked as unsafe.

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton