How to waste a Friday evening

Pascal Cuoq - 21st Oct 2011

Here is a quick recipe for completely wasting a Friday evening:

  1. use Csmith to generate a program that GCC happens to mis-compile in 32-bit into an executable that produces the same result as the correct 64-bit compilation of the same program;
  2. mess up the Clang double-check by forgetting the -m32 option so that it looks that GCC and Clang both agree there is a bug in the value analysis (which produces a result different from the consensus);
  3. look for bug that isn't there;
  4. goto 3
Pascal Cuoq
21st Oct 2011