2 ms·
Testing was the hardest thing I came across. You have on your hands a compiler that you can no longer think of a program for, that would produce an incorrect r
by Swizec 14y ago
Testing was the hardest thing I came across.
You have on your hands a compiler that you can no longer think of a program for, that would produce an incorrect result. You're happy.
Then your friend comes along and the first thing they try behaves incorrectly.
The problem isn't even that the compiler would crash and burn, it lovingly compiles the input program into something that does the wrong thing!
- michaelt 14y agoThere are tools available that can generate random (valid) C programs, comparing the results generated by code from different compilers [1]. CSmith say bugs have been found in every tool tested [2] - from GCC to costly commercial compilers. [1] http://gcc.gnu.org/wiki/summit2010?action=AttachFile&do=get&target=regehr_gcc_summit_2010.pdf http://gcc.gnu.org/wiki/summit2010?action=AttachFile&do=... [2] http://embed.cs.utah.edu/csmith/ http://embed.cs.utah.edu/csmith/