Helgrind
This is a thread-error detector for detecting synchronization errors in C, C++, and Fortran programs that include POSIX threads.
Helgrind can detect three classes of error. Firstly, it can detect the incorrect use of the API, for example, unlocking a mutex that is already unlocked, unlocking a mutex that was locked by a different thread, or not checking the return value of certain pthread functions. Secondly, it monitors the order in which threads acquire locks and thus detects potential deadlocks that could arise from the formation of cycles of locks, which is also known as the deadly embrace. Finally, it detects data races, which can happen when two threads access a shared memory location without using suitable locks or other synchronization ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access