C4: the C compiler concurrency checker

The correct compilation of atomic-action concurrency is vital now that multicore processors are ubiquitous. Despite much recent work on automated compiler testing, little existing tooling can test how real-world compilers handle compilation of atomic-action code. We demonstrate C4, a tool for exploring the concurrency behaviour of real-world C compilers such as GCC and LLVM. C4 automates a workflow based on generating, fuzzing, and executing litmus tests. So far, C4 has found two new control-flow bugs in GCC and IBM XL, and reproduced two historic concurrency bugs in GCC 4.

[1]  John Wickerson,et al.  Dreaming up Metamorphic Relations: Experiences from Three Fuzzer Tools , 2021, 2021 IEEE/ACM 6th International Workshop on Metamorphic Testing (MET).

[2]  Bo Jiang,et al.  CUDAsmith: A Fuzzer for CUDA Compilers , 2020, 2020 IEEE 44th Annual Computers, Software, and Applications Conference (COMPSAC).

[3]  Soham Chakraborty,et al.  Promising 2.0: global optimizations in relaxed memory concurrency , 2020, PLDI.

[4]  Scott Owens,et al.  Modular Relaxed Dependencies in Weak Memory Concurrency , 2020, ESOP.

[5]  Tsong Yueh Chen,et al.  Metamorphic Testing: A New Approach for Generating Next Test Cases , 2020, ArXiv.

[6]  ZhangLu,et al.  A Survey of Compiler Testing , 2020 .

[7]  Andy Zaidman,et al.  A snowballing literature study on test amplification , 2019, J. Syst. Softw..

[8]  Stephen Kell,et al.  Some were meant for C: the endurance of an unmanageable language , 2017, Onward!.

[9]  Alastair F. Donaldson,et al.  Automated testing of graphics shader compilers , 2017, Proc. ACM Program. Lang..

[10]  Daniel Lustig,et al.  Automated Synthesis of Comprehensive Memory Model Litmus Test Suites , 2017, ASPLOS.

[11]  George A. Constantinides,et al.  Automatically comparing memory consistency models , 2017, POPL.

[12]  Margaret Martonosi,et al.  TriCheck: Memory Model Verification at the Trisection of Software, Hardware, and ISA , 2016, ASPLOS.

[13]  Viktor Vafeiadis,et al.  Validating optimizations of concurrent C/C++ programs , 2016, 2016 IEEE/ACM International Symposium on Code Generation and Optimization (CGO).

[14]  Alastair F. Donaldson,et al.  Many-core compiler fuzzing , 2015, PLDI.

[15]  Mark Harman,et al.  The Oracle Problem in Software Testing: A Survey , 2015, IEEE Transactions on Software Engineering.

[16]  Jade Alglave,et al.  Herding cats: modelling, simulation, testing, and data-mining for weak memory , 2014, PLDI 2014.

[17]  Zhendong Su,et al.  Compiler validation via equivalence modulo inputs , 2014, PLDI.

[18]  Andrew W. Appel,et al.  Verified Compilation for Shared-Memory C , 2014, ESOP.

[19]  J. Alglave,et al.  Herding Cats , 2014, ACM Transactions on Programming Languages and Systems.

[20]  Francesco Zappa Nardelli,et al.  Compiler testing via a theory of sound optimisations in the C11/C++11 memory model , 2013, PLDI.

[21]  Peter Sewell,et al.  Clarifying and compiling C/C++ concurrency: from C++11 to POWER , 2012, POPL '12.

[22]  Xuejun Yang,et al.  Finding and understanding bugs in C compilers , 2011, PLDI '11.

[23]  Jade Alglave,et al.  Litmus: Running Tests against Hardware , 2011, TACAS.

[24]  Peter Sewell,et al.  Mathematizing C++ concurrency , 2011, POPL '11.

[25]  Suresh Jagannathan,et al.  Relaxed-memory concurrency and verified compilation , 2011, POPL '11.

[26]  Xavier Leroy,et al.  Formal verification of a realistic compiler , 2009, CACM.