A tool to detect misuses of the POSIX pthreads API but not Helgrind

156 Views Asked by At

For some reason I can't use Helgrind to detect misuses of the POSIX pthreads API (for example, unlocking a non-locked mutex, deallocation of memory that contains a locked mutex and so on). I tried to find another tool but actually failed. As I found out, Dr. Memory can't be used for detection thread errors, and Thread Sanitizer is able to detect only data races. Is it really so? Could you please recommend me some other tools for that?

1

There are 1 best solutions below

0
kuba On

Thread Sanitizer does detect the things you mentioned (unlocks of an unlocked mutex, destruction of a locked mutex), and several more bugs like thread leaks.