The C4 Project

Explosive Compiler Concurrency Testing

What is C4?

C4 is a project to check C compiler concurrency. The goal is to be able to find bugs in the way real-world compilers implement the C11 memory model.

Our approach is based on several key principles:

The C4 subprojects

C4 contains several free and open-source (FOSS) subprojects:

a fuzzer for litmus tests github; MIT with some CECILL-B code
an automatic runner for compiler test campaigns github; MIT
a set of litmus tests pre-generated with memalloy, for use as c4f input github; public domain
a set of Bash scripts for automating some c4f and c4t workflows github; MIT
a copy of LLVM instrumented with run-time selectable, concurrency-related, mutations github; Apache 2.0 with LLVM extensions

These projects are designed to be used together with a litmus test runner (such as litmus7) to run automatic tests against compilers on one or more machines.

Running tests with C4

Documentation on how to use C4 is forthcoming - watch this space!

Getting involved

We have a roadmap for future development priorities.

We welcome contributions for each of the subprojects, be they code changes, documentation, or examples and case studies. Check each subproject's GitHub repository to find out more.



Development on C4 was funded from 2018 to 2021 as part of Interface Reasoning for Interacting Systems.