Using the AddressSanitizer API

Recently, I’ve spent some time annotating string-processing C code with preconditions so that I can test our verification tool on it. All of these preconditions look quite similar—you get a pointer that you assume points to a null-terminated string; sometimes a pointer to a buffer with its size passed in another argument—but still I wanted to test somehow that they’re never violated at runtime. In this article I’ll show how to use AddressSanitizer to dynamically test such preconditions, including checking whether a pointer points to a correct null-terminated string or how much space is safely accessible in a buffer starting from a given pointer.

Initial thoughts on Rust

My opinion on the Rust programming language, based on weekend or two spent playing with its newly-released 1.0 version.