--- layout: post author: Pascal Cuoq date: 2011-10-21 21:49 +0200 categories: csmith value format: xhtml title: "How to waste a Friday evening" summary: --- {% raw %}

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
{% endraw %}