How to waste a Friday evening
Pascal Cuoq - 21st Oct 2011Here is a quick recipe for completely wasting a Friday evening:
- 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;
- 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); - look for bug that isn't there;
- goto 3