Securing low-level software with memory safety incrementally