PREfast for Drivers (Prefast.exe) is a static source code analysis tool that detects certain classes of errors not easily found by the typical compiler. PREfast for Drivers includes PREfast, a component that detects common basic coding errors in C and C++ programs, and a specialized driver module that is designed to detect errors in kernel-mode driver code. PREfast analyzes C and C++ source code by stepping through all possible execution paths in each function and simulating execution to evaluate each path for problems. PREfast does not actually execute code and cannot find all possible errors, but it can find errors that the compiler may ignore and that may be difficult to find during debugging. PREfast for Drivers checks for driver-specific issues such as correct interrupt request level (IRQL), use of preferred driver routines, misuse of driver routines, and more aggressive checking of memory leaks and leaks of other resources such as locks. PREfast for Drivers supports analysis of code that uses annotations to provide PREfast with information about the intended use of an annotated function, which allows PREfast to better determine whether a particular bug exists. PREfast for Drivers is provided in the Microsoft Windows Server 2003 SP1 DDK and the Windows Driver Kit (WDK). General PREfast Static Analysis Tools - WinHEC 2007
Static Tools for Driver Development - WHDC Labs
|