"CCured is a program transformation system that adds memory safety guarantees to C programs by verifying statically that memory errors cannot occur and by inserting run-time checks where static verification is insufficient."
Re:Glibc getaddrinfo stack-based buffer overflow
by mikeash on Wednesday February 17, 2016 @09:56AM
(#11118204)
I haven't heard of it before, but that's the sort of thing I'm thinking of, and that looks pretty cool. Looks like the resulting programs still perform reasonably well too.
http://www.cs.berkeley.edu/~necula/Papers/ccured_pldi03.pdf
"CCured is a program transformation system that adds memory safety guarantees to C programs by verifying statically that memory errors cannot occur and by inserting run-time checks where static verification is insufficient."