sanitizer
All modern compiler has an option to add runtime code that check data boundary, double free, use after free, miss free, stack overflow, and so on.
At beginning was Clang/LLVM 3.1, but GCC 4.8+ (2013/3) has it from some years now.
That runtime code slow down binary to the level of C#, Java and Rust, so must be used only when build for debug with -g.
Once code is clean, you can remove sanitize address and get fast pure C compiled memory safe code without compromise.
Today we do not need slow memory safe languages, simply informed programmers