vld report some leaks in boost unit test cpp

Aug 29, 2011 at 8:32 AM

I use v2.2 and include vld.h in cpp of boost unit test.

The result of after execute empty unit test, the output window display 3 memory leaks..

    f:\dd\vctools\crt_bld\self_x86\crt\src\ioinit.c (137): MyUTC.exe!_ioinit + 0x15 bytes
    f:\dd\vctools\crt_bld\self_x86\crt\src\crt0.c (235): MyUTC.exe!__tmainCRTStartup + 0x5 bytes
    f:\dd\vctools\crt_bld\self_x86\crt\src\crt0.c (182): MyUTC.exe!mainCRTStartup
    0x768D1114 (File and line number not available): kernel32.dll!BaseThreadInitThunk + 0x12 bytes
    0x77D6B429 (File and line number not available): ntdll.dll!RtlInitializeExceptionChain + 0x63 bytes
    0x77D6B3FC (File and line number not available): ntdll.dll!RtlInitializeExceptionChain + 0x36 bytes

    f:\dd\vctools\crt_bld\self_x86\crt\src\xdebug.cpp (10): MyUTC.exe!operator new + 0x17 bytes
    f:\dd\vctools\crt_bld\self_x86\crt\src\xdebug.cpp (22): MyUTC.exe!operator new[] + 0x15 bytes
    c:\program files\microsoft visual studio 9.0\vc\include\xlocale (626): MyUTC.exe!std::_Maklocstr<char> + 0x19 bytes
    c:\program files\microsoft visual studio 9.0\vc\include\xlocnum (143): v.exe!std::numpunct<char>::_Init + 0x1B bytes
    c:\program files\microsoft visual studio 9.0\vc\include\xlocnum (108): MyUTC.exe!std::numpunct<char>::numpunct<char>
    c:\program files\microsoft visual studio 9.0\vc\include\xlocnum (115): MyUTC.exe!std::numpunct<char>::_Getcat + 0xB2 bytes

    .....

    f:\dd\vctools\crt_bld\self_x86\crt\src\mbctype.c (593): MyUTC.exe!_setmbcp + 0x16 bytes
    f:\dd\vctools\crt_bld\self_x86\crt\src\mbctype.c (854): MyUTC.exe!__initmbctable + 0x7 bytes
    f:\dd\vctools\crt_bld\self_x86\crt\src\stdargv.c (103): MyUTC.exe!_setargv
    f:\dd\vctools\crt_bld\self_x86\crt\src\crt0.c (244): MyUTC.exe!__tmainCRTStartup + 0x5 bytes
    f:\dd\vctools\crt_bld\self_x86\crt\src\crt0.c (182): MyUTC.exe!mainCRTStartup
    0x768D1114 (File and line number not available): kernel32.dll!BaseThreadInitThunk + 0x12 bytes
    0x77D6B429 (File and line number not available): ntdll.dll!RtlInitializeExceptionChain + 0x63 bytes
    0x77D6B3FC (File and line number not available): ntdll.dll!RtlInitializeExceptionChain + 0x36 bytes

Is it a bug for VLD or something I just miss ?

In MyUTC.cpp

#define BOOST_TEST_MODULE MyUTC
#include <boost/test/unit_test.hpp>

BOOST_AUTO_TEST_SUITE(UTCTEST)

BOOST_AUTO_TEST_CASE(Test1)
{

}

BOOST_AUTO_TEST_SUITE_END()