Need Help | Clang Static Analyzer

Hello everyone,

My name is Malhar Thakkar. I am a final year undergraduate studying at the Indian Institute of Technology Hyderabad.

I have recently started looking into the Clang Static Analyzer and I want to contribute to the community.
So, could anyone point me to some beginner level(easy to fix) bugs for which I can submit a patch?

Thank you.

Malhar Thakkar


I just sent this privately, but I’ll repeat it here on the list. Here is a suggested starter bug on the clang static analyzer codebase:

“False Positive PthreadLockChecker Use destroyed lock” <>

The analyzer has a checker (PthreadLockChecker.cpp) that emits a diagnostic when the programmer tries to acquire a mutex twice or lock a mutex that has already been destroyed. Unfortunately, it has a false positive: if the programmer calls pthread_destroy_lock() and that call fails (returns a non-zero value) and then later the programmer tries to acquire the lock then the analyzer incorrectly warns that the mutex has been destroyed. There is an example of the false positive in the linked bugzilla URL above.

Fixing this false positive is a good starter bug to get you familiar with the checker side of the analyzer. If you haven’t seen it already, a good place to start would be the Checker Development Manual <>.

And please don’t hesitate to email if you have any questions or want to discuss approaches to fixing the bug!