c++cryptcrypto++visual-leak-detector

Crypto++ multibyte/unicode issue


I'm using Crypto++ library in my project but I've the following message:

In memory integrity check failed. This may be caused by debug breakpoints or DLL relocation.

And Visual Leak Detector detect lots of memory leaks, but I'll dctor are corectly called.

I've build Crypto with msvc-2010 (MultiByte) and I'm using cryptopp from anothre library (UNICODE)

Is this dangerous?


Solution

  • In memory integrity check failed.

    It sound like you are using one of the pre-built FIPS libraries available for the Crypto++ website. (That's where I've seen this most often).

    If so, you need to develop your program with the same version that was used to build the DLL. That's probably Visual Studio 6, or Visual Studio 2002/2003 or so. You will have lots of memory problems if you try to use it with Visual Studio 2010 ro 2012.

    And Visual Leak Detector detect lots of memory leaks, but I'll dctor are corectly called.

    Ignore these. Microsoft has an unfixed bug in that damn thing dating back to the Visual Studio 6 days. You can find the bug report if you search Microsoft Connect. Its talked about on the Leak page from the Crypto++ wiki.

    I've build Crypto with msvc-2010 (MultiByte) and I'm using cryptopp from anothre library (UNICODE)

    The other library must be built using Visual Studio 2010 also. UNICODE is OK, but you will need to handle the MBCS/UNICODE conversions. See Character Set Considerations on the Crypto++ wiki.