From Wikipedia:
"BoundsChecker is a memory checking tool used for C++ software development with Microsoft Visual C++. It is part of the DevPartner for Visual C++ BoundsChecker Suite. Comparable tools are Purify, Insure++ and Valgrind.
BoundsChecker can be run in two modes ActiveCheck which doesn't instrument the application and FinalCheck which does.
ActiveCheck performs a less intrusive analysis and monitors all calls by the application to the C Runtime Library, Windows API and calls to COM objects. By monitoring memory allocations and frees it can detect memory leaks and overruns. Monitoring API and COM calls enables ActiveCheck to check parameters, returns and exceptions and report exceptions when they occur. Thread deadlocks can also be detected by monitoring of the synchronization objects and calls giving actual and potential deadlock detection."
I am using the tool in ActiveCheck mode. That many people are not familiar with it is not surprising to me given its prohibitive cost. I am using
a trial version. Perhaps some people have used it in a business environment.
Even though the code I posted is from a much larger directx program, I
believe that the test case is essentially self contained - it is composed of the
declaration and assignment of one std::string which is a file path
to an existing, readable file and the attempt to open that file for reading.
This code has the same problem as pointed out by Boundschecker.
std::ifstream ifs;ifs.open("test.txt", std::ios::in);