Month: January 2013

  • Nobody Expects the Spanish Inquisition, or INT_MIN to be Divided by -1

    INT_MIN % -1 and INT_MIN / -1 in C/C++ are little gifts that keep on giving. Recently, Xi Wang has been using this construct to knock over languages implemented in C/C++. Then today Tavis Ormandy posted an excellent local DOS for a Windows 8 machine. But the fun doesn’t stop there. For one thing, as…

  • C and C++ Aren’t Future Proof

    A C or C++ program is expected to follow a collection of rules such as “don’t access out-of-bounds array elements.” There are a lot of these rules and they are listed (or are implicit) in the various language standards. A program that plays by all of these rules—called a conforming program—is one where we might, potentially,…

  • The Space Child’s Mother Goose

    I just noticed that this old favorite has been reprinted. A quick excerpt: This is the Theory Jack built. This is the Flaw That lay in the Theory Jack built. This is the Mummery Hiding the Flaw That lay in the Theory Jack built. This is the Summary Based on the Mummery Hiding the Flaw…

  • Hiding Bugs from Branch Coverage

    It’s hard to know when a piece of software has been sufficiently tested. Code coverage metrics are a partial answer. Basically, a coverage metric is a function that maps each execution to a set of coverage targets. For example, if we are performing function coverage, then the universe of targets is comprised of functions from…

  • When Software Ages Badly

    In some respects, software ages gracefully: it generally starts out working poorly but gets better over time as bugs are fixed. Unlike hardware, there’s no physical wearing out of parts. This post is about a few ways in which software doesn’t get better with age. In The Mythical Man Month Brooks observes that any sufficiently complex software…

  • Peeking into the Trash

    Just to see what was there, I rendered a thumbnail for every URL in my email trash folder. Below are the first 250 (full set is here).