5

We've been running for years with BoundsChecker for Visual C++ 6 (I think it was BoundsChecker 5 or 6, too). We've upgaded to VS2008 (finally!), and now need a follow-up for the outdated BoundsChecker.

How's the landscape?
What tools are out there?
Any new kids in town?
Any new ideas dealing with the problems we used memory profilers for?
Your recent experiences with these tools?
Recommendations?

The main application is C++ with many COM DLL's, we are looking to track native, C++ and COM leaks and objects. Bounds Checker for that size was already a pain in performance, sorting out the slew of data and some of its limitations.

Support for managed applications (primarily C#) is required, though that may be a separate tool.


Related (but IMO incomplete) question: Modern equivalent of BoundsChecker for Visual Studio 2008


[edit]

Regardign the comment, "In modern C++, you just use self-checking types, and bounds are never broken" :

Reference counted smart pointers can have cyclic references. Interfacing COM components is inherently unsafe, as it requires a lot of manual memory management. I've had a UI-less 3rd party service leak GDI handles so it crashed our overnight tests - the vendor blamed it on a "strange" Microsoft API. I have to interface C-based libraries, I have tons of legacy code that assumes allocation trickery in the sense of Numerical Recipes is a good thing and variable names longer than 3 letters are for typists. I have code from engineers for whom a std::vector<double>::iterator looks much more scary than a double ***, good luck developing and testing these without a solid background in signal processing.

So unless you come here, rewrite and encapsulate the core of a million lines of code in fool-proof C++ classes and make sure a few dozen products still work as before, keep your smart-assery to yourself. I wish I wouldn't need a memory checker, but I do. Thank you.

Community
  • 1
  • 1
peterchen
  • 40,917
  • 20
  • 104
  • 186

4 Answers4

3

Disclaimer and warning: I work for Micro Focus, owner of the DevPartner Studio and BoundsChecker products.

BoundsChecker 10.5, part of DevPartner Studio 10.5 (though you can buy it by itself), supports Visual Studio 2005, 2008 and 2010 unmanaged code for 32 and 64 bit applications in essentially the same way it supported 32 bit applications on Visual Studio 6.0. While enhancing it to support X64 applications, we found and fixed quite a few very old problems, and made a start at working in spite of the .NET 4.0 code present in some VS 2010 applications. I say "in spite of" because .NET 4.0 turns out to do a lot of very nasty things in the process space, doing some things that Microsoft warns everybody else not to do, and has a certain amount of built-in resistance to tools like BoundsChecker, which are essentially gigantic viruses.

Anyway, since that release (February 4th), we have updated it to work on Windows 7 SP1 (which isn't quite public yet), and as far as BoundsChecker is concerned, we work with Visual Studio 2010 SP1 as well. We also discovered a nasty .NET 4.0 trap, and figured out to prevent it from taking us down. These enhancements and fixes will be available in our next public update, hopefully within the next month or so.

Rick Papo
  • 369
  • 1
  • 2
  • 10
  • If anybody has questions concerning Micro Focus DevPartner Studio or BoundsChecker, please visit our forum at http://community.microfocus.com/Forums/9_DevPartner. – Rick Papo Jul 14 '11 at 18:05
  • The forum has changed, and changed location. It is now at http://community.microfocus.com/ – Rick Papo Aug 02 '12 at 20:47
2

We evaluated Boundschecker, Intel's Inspector and Purify.

They were all more or less crap.

For our main application, BoundsChecker would not start it after many hours; it only worked for a couple of smaller applications; but find a couple of things (I think we're still in contact with them to figure things out)

Intel's Inspector works, but does not instrument the code, it runs on the executable only (maybe works better when used with the whole suite of Intel products).

Purify failed miserably; we were never able to use it.

We're still in limbo about that.

Max.

Max
  • 3,128
  • 1
  • 24
  • 24
2

I have a massive application (here at work), and the new bounds checker 10.5 (supports 64 bit apps now) pretty much works with it. The trick Max is not to turn on all the checker features of devpartner bounds checker at once. Turn on just memory leaks, or turn on just some other feature, then run your app. And by all means exclude modules you don't need. There are quite a few things you can use to tune your settings so it goes faster. But yes, it does take a performance hit. But that is the name of the ballgame.

Intel's Parrallel inspector gave us thousands and thousands of false positives. Didn't use it.

Purify only works on 32 bit apps. i.e. small 32 bit native apps. Forget about using it with a managed C++ app.

And just for the record, if you have a large 32 bit app, memory analysis tools in general won't work very much, because of the massive memory overhead. And since you have very limited memory in a 32 bit address space, you quickly run out of room, and the tools fail.

C.J.
  • 15,637
  • 9
  • 61
  • 77
  • Theoretically, you could move all the memory tracking information to another process, but that would make the memory analysis tool even slower than it already (presumably) was. – Rick Papo Dec 30 '11 at 01:16
1

Boundschecker: I just bought a (&(^ subscription which only entitles me to use the damned product for 99 days, so I'm pretty damned upset about that) but anyhow I was having big memory troubles and thought I ought to run this thing. It seems to catch lots of interesting things, but is so damned slow that, well put it this way: my appliciation is still in the DLL init code; it has been running for at least a couple hours, and so far it hasn't even gotten as far as the app does normally in the first COUPLE SECONDS. Boundschecker used to be 'the shit' back in numega days, but it seems like it is really another technological orphan being peddled by an opportunitstic business entity, like borland compilers.

So I really like it when it works, it has lots of great info. I just need to see if I will be able to actually get any decent results. It is currently using 4+ GB of RAM and hasn't even started up fully yet. Since I use win7/64 with a crippled home edition which will only recognize 12GB, I may run out of memory before anything really interesting happens. And it will be sometime a few days from now...

  • Have you had any luck with Microsoft's Application Verifier? – C.J. Sep 09 '11 at 04:21
  • Price: $99 is dirt cheap compared to the normal price, which starts at $695. Performance: We are very aware of this, and are working to improve the product, but when you consider what the product is trying to do, you cannot ask for complete accuracy and low performance impact at the same time. We could sacrifice accuracy for speed, but we would get roasted for being sloppy. We have generally sacrificed speed for accuracy, and then we get roasted for being slow. Name your poison. – Rick Papo Dec 30 '11 at 01:21
  • "Boundschecker used to be ... in Numega days, but it seems like it is really another technological orphan being peddled by an opportunitstic business entity, like borland compilers." -- You are not far from the truth, but consider one thing: both BoundsChecker and the applications it tests have grown enormously since the 1990s. BoundsChecker may have worked quickly on your typical 1990s application, but since then your typical application has grown, and BoundsChecker has also grown considerably. Some of that growth was fat added by well-intentioned (but misdirected) designers. – Rick Papo Dec 30 '11 at 22:02