I haven't used it myself, but I understand Rust can make much better guarantees about memory safety and thread safety than C.