Pierre
Pierre

Reputation: 2090

How to find heap corruption in my DLL with Application Verifier?

I develop a C++ DLL with Visual Studio 2017 and I have some memory issues. I would like to use Application Verifier to debug it but the application who runs my DLL (a third-party application) is also heap corrupted. So if I activate Application Verifier, the application crashes before my DLL is loaded.

Is it possible to say to Application Verifier to only take care of heap corruption of a DLL or a module? If not, is there a way to debug my DLL with another tool?

Upvotes: 0

Views: 2035

Answers (2)

KimKulling
KimKulling

Reputation: 2843

As far as I kno Application verifier uses the global windows flags to detect leaks and heap corruption like this. So you can directly use the gflags tool to enable this functionality.

Please check the following discussion from Microsoft How to use gflags for finding heap corruptions.

Upvotes: 0

GBrookman
GBrookman

Reputation: 433

Why not write a simple wrapper app? I've had to do that for a third party DLL that caused heap corruptions that would later crash our app. In this case it was in the destructor so I only had to load and free it. But if that didn't find it for you you could add unit tests for each export.

Upvotes: 1

Related Questions