Clang Thread Safety Checks Begin Uncovering Bugs In The Linux Kernel
![LLVM](/assets/categories/llvm.webp)
The LLVM Clang compiler features Thread Safety Analysis capabilities as outlined in the LLVM documentation to warn over potential race conditions. Google pursued this effort and is already being used within Google to uncover bugs.
Marco Elver posted this set of 24 RFC patches with one approach to compiler-based capability and locking analysis.
Bart Van Assche had concurrently been working on compile-time thread-safety checking for the Linux kernel and this week also posted this set of 33 RFC patches.
We'll see what solution proves superior and is ultimately accepted upstream or if some new unified approach evolves. In any event LLVM Linux developer Nick Desaulniers with Google posted that these patch series have already been uncovering locking bugs within the Linux kernel.
57 Comments