Microsoft Application Verifier
Application Verifier is a runtime verification tool for
unmanaged code that assists in quickly finding subtle
programming errors that can be extremely difficult to
identify with normal application testing.
Application Verifier is designed specifically to
detect and help debug memory corruptions and critical
security vulnerabilities. It makes it easier to create
reliable applications by monitoring an application's
interaction with the Windows operating system, profiling its
use of objects, the registry, the file system, and Win32
APIs (including heaps, handles, locks, and more). It also
includes checks to predict how well the application will
perform under Least-privileged User Account operation.
Check it out here