I want to use static analysis tools to detect null-pointer dereferences and memory leaks in Linux device drivers (linux-3.17.2).
I have tried some tools:
- Clang static analyzer
It shows some unimportant warnings, such as "Value stored to 'usbhid' during its initialization is never read". - Smatch and Cppcheck They find some defects, but many null-pointer dereferences found by maintainers or myself can not be detected.
Could you recommend some other useful static tools to detect real bugs in Linux device drivers?
Not so long ago there was published an article about Linux 3.18.1 check by PVS-Studio. Searching memory leaks is their darling hobby; they greatly cope with searching misprints. Nevertheless, they found bugs, and I decided to mention this article here. By the way, they have many articles about their searches - where and what they found.