-
Undefined Behavior Consequences Contest Winners
The contest that I posted the other day received some very nice entries. I decided to pick multiple winners since the best entries illustrate consequences of several kinds of undefined behavior. First, here’s the runner up, submitted by Octoploid: This program is undefined by C99, where signed left shifts must not push a 1 bit…
-
Twenty Years of Linux
Twenty years ago, almost to the day, my friend Jamie showed up with four floppy disks. Two of them were a boot/root pair for 386BSD (none of FreeBSD, NetBSD, or OpenBSD existed yet) and two of them were for Linux 0.96c. It’s pretty hard to overstate how cool and amazing it was to see protected-mode…
-
Anniversary Hike
Sarah and I have been married for 11 years today; we celebrated by going hiking with the kids up at Alta, where our wedding was. Unfortunately, after a couple of hours of great conditions, a cold rain storm reminded us that weather in the mountains can be serious. At least there was no lightning! We…
-
Contest: Craziest Compiler Output due to Undefined Behavior
[UPDATE: Winners are here.] The C and C++ standards fail to assign a meaning to a program that overflows a signed integer or performs any of the 190+ other kinds of undefined behavior. In principle, a conforming compiler can turn such a program into a binary that posts lewd messages to Twitter and then formats…
-
Parallelizing Delta Debugging
Delta debugging is a technique for taking an input to a computer program that causes the program to display a certain behavior (such as crashing) and automatically creating a smaller input that triggers the same behavior. For complex programs that typically process large inputs (compilers, web browsers, etc.) delta debugging is an important part of…
-
Scooping and New Publication Models
If I come up with a great new research idea, sit on it for a couple of years, and then someone else publishes it before I do, then I got scooped. This is unfortunate but as long as the ideas were developed independently, nobody has done anything wrong. Of course, in the real world, establishing…
-
When is Undefined Behavior OK?
Under what circumstances is it acceptable for a programming language to admit undefined behaviors? Here I mean undefined behavior in the C/C++ sense where, for example, “anything can happen” when you use an uninitialized variable. In my opinion, five conditions need to be fulfilled. First, the undefined behavior must provide a significant, robust performance win.…
-
Academic Attention for Undefined Behavior
Undefined behaviors are like blind spots in a programming language; they are areas where the specification imposes no requirements. In other words, if you write code that executes an operation whose behavior is undefined, the language implementation can do anything it likes. In practice, a few specific undefined behaviors in C and C++ (buffer overflows and…
-
The PhD Grind, and Why Research Isn’t Like Sex
Phil Guo’s short online book, The PhD Grind, is the best description of the modern PhD experience in CS that I know of. People working on, or thinking about working on, a PhD in CS should read it. In this post I just want to comment on a few things. Phil vividly describes the sinking feeling that…
-
Maybird
[nggallery id=55] Over the weekend my friend Derek and I did a short backpacking trip into Maybird Gulch, a minor sub-drainage of Little Cottonwood Canyon near Salt Lake City. Amazingly, on a Friday night our only company was a pack of coyotes (or perhaps this isn’t so amazing—most of Maybird is very steep and/or rocky…