Month: September 2010

  • Volatile Structs Are Broken

    For at least a year we’ve taken a break from reporting volatile bugs to C compiler developers. There were various reasons: the good compilers were becoming pretty much correct, we faced developer apathy about volatile incorrectness, our volatile testing tool had some weird problems, and basically I just got bored with it. Today my PhD…

  • Conference Hijacking

    The ACM Workshop on Programming Languages and Operating Systems (PLOS) is a small event where researchers interested in the intersection of these areas can share ideas and results. There have been five of these workshops and I’ve attended a few of them and presented a paper at one. It’s a fun event and a perfectly…

  • Late Summer in Heaven

    If there’s a heaven, and if I go there, I would not at all mind eating a plate of this every day for the rest of eternity. Our friend Jeanine gave us a ton of peaches from the tree in her yard, the blackberries are from our own bushes. The bourbon is Rowan’s Creek.

  • Why Not Mix Signed and Unsigned Values in C/C++?

    Most C/C++ programmers have been told to avoid mixing signed and unsigned values in expressions. However — at least in part because we usually follow this advice — many of us are not totally on top of the underlying issues. This program illustrates what can go wrong: #include <stdio.h> int main (void) {   long…

  • Giving a Talk at the GCC Summit

    Last month I proposed giving a paper presentation at the next GCC Developers’ Summit about our compiler bug finding work. Happily, it was accepted and in late October I’ll head up to Ottawa to tell them what we’ve been doing and what we plan to do.  Here’s the abstract: About 60 wrong-code and crash bugs…

  • Fun With Shift Optimizations

    It’s fun to see what a modern compiler can optimize and what it cannot. The other day, while working on a new piece about undefined behavior, I noticed some C compilers failing to optimize simple code based on shifts. Here are the functions: int shift1 (int x, int y) { if (x>=0) { return (x>>y)…

  • Strange Utah

    Pretty much anyone in the world who knows that Utah exists, knows that Utah is weird. Outsiders have vague and usually uninformed — but nevertheless strong — feelings about Utah. Residents have more concrete information. The proper reaction is not to deny, marginalize, or rationalize Utah’s weirdness. The proper reaction is to embrace it, because…

  • Static Analysis Fatigue

    My student Peng and I have been submitting lots of bug reports to maintainers of open source software packages. These bugs were found using Peng’s integer undefined behavior detector. We’ve found problems in OpenSSL, BIND, Perl, Python, PHP, GMP, GCC, and many others. As we reported these bugs, I noticed developers doing something funny: in…