Section: New Software and Platforms
Cmmtest: a tool for hunting concurrency compiler bugs
Participant : Francesco Zappa Nardelli [contact] .
Languages, concurrency, memory models, C11/C++11, compiler, bugs.
The Cmmtest tool performs random testing of C and C++ compilers against the C11/C++11 memory model. A test case is any well-defined, sequential C program; for each test case, cmmtest:
-
compiles the program using the compiler and compiler optimisations that are being tested;
-
runs the compiled program in an instrumented execution environment that logs all memory accesses to global variables and synchronisations;
-
compares the recorded trace with a reference trace for the same program, checking if the recorded trace can be obtained from the reference trace by valid eliminations, reorderings and introductions.
Cmmtest identified several mistaken write introductions and other unexpected behaviours in the latest release of the gcc compiler. These have been promptly fixed by the gcc developers.
Cmmtest is available from http://www.di.ens.fr/~zappa/projects/cmmtest/ and a list of bugs reported thanks to cmmtest is available from http://www.di.ens.fr/~zappa/projects/cmmtest/gcc-bugs.html .