Giter VIP home page Giter VIP logo

vld's Introduction

Visual Leak Detector Build status PayPal donate button

Microsoft Fork

This fork was created to address some of the issues found in the original repo https://github.com/KindDragon/vld, which has not been updated since November 24, 2017. The changes in this repo can be merged back into the original repo if it is again accepting pull requests.

If you would like to contribute to this fork, please submit a pull request. It will be looked at on a "best effort" basis as our team is available.

Introduction

Visual C++ provides built-in memory leak detection, but its capabilities are minimal at best. This memory leak detector was created as a free alternative to the built-in memory leak detector provided with Visual C++. Here are some of Visual Leak Detector's features, none of which exist in the built-in detector:

  • Provides a complete stack trace for each leaked block, including source file and line number information when available.
  • Detects most, if not all, types of in-process memory leaks including COM-based leaks, and pure Win32 heap-based leaks.
  • Selected modules (DLLs or even the main EXE) can be excluded from leak detection.
  • Provides complete data dumps (in hex and ASCII) of leaked blocks.
  • Customizable memory leak report: can be saved to a file or sent to the debugger and can include a variable level of detail.

Other after-market leak detectors for Visual C++ are already available. But most of the really popular ones, like Purify and BoundsChecker, are very expensive. A few free alternatives exist, but they're often too intrusive, restrictive, or unreliable. Visual Leak Detector is currently the only freely available memory leak detector for Visual C++ that provides all of the above professional-level features packaged neatly in an easy-to-use library.

Visual Leak Detector is licensed free of charge as a service to the Windows developer community. If you find it to be useful and would like to just say "Thanks!", or you think it stinks and would like to say "This thing sucks!", please feel free to drop us a note. Or, if you'd prefer, you can contribute a small donation. Both are very appreciated.

Documentation

Read the documentation at https://github.com/KindDragon/vld/wiki

Contributing

We encourage developers who've added their own features, or fixed bugs they've found, to contribute to the project. The full version-controlled source tree is available publicly via Git at the URL below. Feel free to clone from this URL and submit patches for consideration for inclusion in future versions. You can also issue pull requests for changes that you've made and would like to share.

Copyright © 2005-2017 VLD Team

vld's People

Contributors

chris1248 avatar cyrus-jackson avatar darobs avatar dcristoloveanu avatar dmoulding avatar ioannis-e avatar jlddodger avatar kinddragon avatar mattdurak avatar microsoft-github-policy-service[bot] avatar zaneuji avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

vld's Issues

VLD detects memory leaks in googletest library building project as Multi-threaded Debug

VLD detects memory leaks in googletest library building project as Multi-threaded Debug (/MTd) (output below).

Building the project as Multi-threaded Debug DLL (/MDd), VLD does not catch whose leaks.

Visual Leak Detector read settings from: C:\test\build\bin\vld.ini
Visual Leak Detector Version 2.5.8 installed.
Running main() from C:\test\googletest\googletest\src\gtest_main.cc
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from AppUnitTest
[ RUN ] AppUnitTest.Test
[ OK ] AppUnitTest.Test (0 ms)
[----------] 1 test from AppUnitTest (1 ms total)

[----------] Global test environment tear-down
[==========] 1 test from 1 test suite ran. (4 ms total)
[ PASSED ] 1 test.
WARNING: Visual Leak Detector detected memory leaks!
---------- Block 844 at 0x00000000AE693C10: 64 bytes ----------
Leak Hash: 0x139C30F4, Count: 1, Total 64 bytes
Call Stack (TID 26640):
Data:
10 3C 69 AE D3 01 00 00 10 3C 69 AE D3 01 00 00 .<i..... .<i.....
10 3C 69 AE D3 01 00 00 01 01 CD CD CD CD CD CD .<i..... ........
CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD ........ ........
CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD ........ ........

---------- Block 842 at 0x00000000AE695090: 24 bytes ----------
Leak Hash: 0x34CD339C, Count: 1, Total 24 bytes
Call Stack (TID 26640):
ntdll.dll!RtlAllocateHeap()
d:\a01_work\43\s\src\vctools\crt\vcstartup\src\heap\new_scalar.cpp (35): app_unit_test.exe!operator new() + 0xA bytes
C:\test\googletest\googletest\src\gtest-port.cc (661): app_unit_test.exe!testing::internal::ThreadLocalRegistryImpl::GetThreadLocalsMapLocked() + 0x44 bytes
C:\test\googletest\googletest\src\gtest-port.cc (556): app_unit_test.exe!testing::internal::ThreadLocalRegistryImpl::OnThreadLocalDestroyed() + 0x5 bytes
C:\test\googletest\googletest\src\gtest-port.cc (683): app_unit_test.exe!testing::internal::ThreadLocalRegistry::OnThreadLocalDestroyed()
C:\test\googletest\googletest\include\gtest\internal\gtest-port.h (1532): app_unit_test.exe!testing::internal::ThreadLocal<std::vector<testing::internal::TraceInfo,std::allocatortesting::internal::TraceInfo > >::~ThreadLocal<std::vector<testing::internal::TraceInfo,std::allocatortesting::internal::TraceInfo > >() + 0x23 bytes
C:\test\googletest\googletest\src\gtest.cc (5599): app_unit_test.exe!testing::internal::UnitTestImpl::~UnitTestImpl() + 0x13 bytes
app_unit_test.exe!testing::internal::UnitTestImpl::scalar deleting destructor'() + 0x18 bytes C:\test\googletest\googletest\src\gtest.cc (5542): app_unit_test.exe!testing::UnitTest::~UnitTest() + 0x34 bytes app_unit_test.exe!testing::UnitTest::GetInstance'::2'::dynamic atexit destructor for 'instance''() + 0x12 bytes
minkernel\crts\ucrt\src\appcrt\startup\onexit.cpp (206): app_unit_test.exe!<lambda_d121dba8a4adeaf3a9819e48611155df>::operator()()
VCCRT\vcruntime\inc\internal_shared.h (204): app_unit_test.exe!__crt_seh_guarded_call::operator()<<lambda_6a47f4c8fd0152770a780fc1d70204eb>,<lambda_d121dba8a4adeaf3a9819e48611155df> &,<lambda_6aaa2265f5b6a89667e7d7630012e97a> >() + 0xA bytes
minkernel\crts\ucrt\inc\corecrt_internal.h (980): app_unit_test.exe!__acrt_lock_and_call<<lambda_d121dba8a4adeaf3a9819e48611155df> >()
minkernel\crts\ucrt\src\appcrt\startup\onexit.cpp (231): app_unit_test.exe!_execute_onexit_table()
minkernel\crts\ucrt\src\appcrt\startup\exit.cpp (226): app_unit_test.exe!<lambda_6e4b09c48022b2350581041d5f6b0c4c>::operator()() + 0xC bytes
VCCRT\vcruntime\inc\internal_shared.h (224): app_unit_test.exe!__crt_seh_guarded_call::operator()<<lambda_d80eeec6fff315bfe5c115232f3240e3>,<lambda_6e4b09c48022b2350581041d5f6b0c4c> &,<lambda_2358e3775559c9db80273638284d5e45> >() + 0xA bytes
minkernel\crts\ucrt\inc\corecrt_internal.h (980): app_unit_test.exe!__acrt_lock_and_call<<lambda_6e4b09c48022b2350581041d5f6b0c4c> >()
minkernel\crts\ucrt\src\appcrt\startup\exit.cpp (259): app_unit_test.exe!common_exit()
minkernel\crts\ucrt\src\appcrt\startup\exit.cpp (294): app_unit_test.exe!exit()
d:\a01_work\43\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl (297): app_unit_test.exe!__scrt_common_main_seh()
d:\a01_work\43\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl (331): app_unit_test.exe!__scrt_common_main()
d:\a01_work\43\s\src\vctools\crt\vcstartup\src\startup\exe_main.cpp (17): app_unit_test.exe!mainCRTStartup()
KERNEL32.DLL!BaseThreadInitThunk() + 0x14 bytes
ntdll.dll!RtlUserThreadStart() + 0x21 bytes
Data:
60 76 69 AE D3 01 00 00 10 3C 69 AE D3 01 00 00 `vi..... .<i.....
00 00 00 00 00 00 00 00 ........ ........

---------- Block 843 at 0x00000000AE697660: 16 bytes ----------
Leak Hash: 0xC8E434DD, Count: 1, Total 16 bytes
Call Stack (TID 26640):
Data:
90 50 69 AE D3 01 00 00 00 00 00 00 00 00 00 00 .Pi..... ........

---------- Block 841 at 0x00000000AE698640: 40 bytes ----------
Leak Hash: 0x57875347, Count: 1, Total 40 bytes
Call Stack (TID 26640):
ntdll.dll!RtlAllocateHeap()
d:\a01_work\43\s\src\vctools\crt\vcstartup\src\heap\new_scalar.cpp (35): app_unit_test.exe!operator new() + 0xA bytes
C:\test\googletest\googletest\src\gtest-port.cc (412): app_unit_test.exe!testing::internal::Mutex::ThreadSafeLazyInit() + 0xA bytes
C:\test\googletest\googletest\src\gtest-port.cc (341): app_unit_test.exe!testing::internal::Mutex::Lock()
C:\test\googletest\googletest\include\gtest\internal\gtest-port.h (1395): app_unit_test.exe!testing::internal::GTestMutexLock::GTestMutexLock() + 0x1A bytes
C:\test\googletest\googletest\src\gtest-port.cc (555): app_unit_test.exe!testing::internal::ThreadLocalRegistryImpl::OnThreadLocalDestroyed() + 0x11 bytes
C:\test\googletest\googletest\src\gtest-port.cc (683): app_unit_test.exe!testing::internal::ThreadLocalRegistry::OnThreadLocalDestroyed()
C:\test\googletest\googletest\include\gtest\internal\gtest-port.h (1532): app_unit_test.exe!testing::internal::ThreadLocal<std::vector<testing::internal::TraceInfo,std::allocatortesting::internal::TraceInfo > >::~ThreadLocal<std::vector<testing::internal::TraceInfo,std::allocatortesting::internal::TraceInfo > >() + 0x23 bytes
C:\test\googletest\googletest\src\gtest.cc (5599): app_unit_test.exe!testing::internal::UnitTestImpl::~UnitTestImpl() + 0x13 bytes
app_unit_test.exe!testing::internal::UnitTestImpl::scalar deleting destructor'() + 0x18 bytes C:\test\googletest\googletest\src\gtest.cc (5542): app_unit_test.exe!testing::UnitTest::~UnitTest() + 0x34 bytes app_unit_test.exe!testing::UnitTest::GetInstance'::2'::dynamic atexit destructor for 'instance''() + 0x12 bytes
minkernel\crts\ucrt\src\appcrt\startup\onexit.cpp (206): app_unit_test.exe!<lambda_d121dba8a4adeaf3a9819e48611155df>::operator()()
VCCRT\vcruntime\inc\internal_shared.h (204): app_unit_test.exe!__crt_seh_guarded_call::operator()<<lambda_6a47f4c8fd0152770a780fc1d70204eb>,<lambda_d121dba8a4adeaf3a9819e48611155df> &,<lambda_6aaa2265f5b6a89667e7d7630012e97a> >() + 0xA bytes
minkernel\crts\ucrt\inc\corecrt_internal.h (980): app_unit_test.exe!__acrt_lock_and_call<<lambda_d121dba8a4adeaf3a9819e48611155df> >()
minkernel\crts\ucrt\src\appcrt\startup\onexit.cpp (231): app_unit_test.exe!_execute_onexit_table()
minkernel\crts\ucrt\src\appcrt\startup\exit.cpp (226): app_unit_test.exe!<lambda_6e4b09c48022b2350581041d5f6b0c4c>::operator()() + 0xC bytes
VCCRT\vcruntime\inc\internal_shared.h (224): app_unit_test.exe!__crt_seh_guarded_call::operator()<<lambda_d80eeec6fff315bfe5c115232f3240e3>,<lambda_6e4b09c48022b2350581041d5f6b0c4c> &,<lambda_2358e3775559c9db80273638284d5e45> >() + 0xA bytes
minkernel\crts\ucrt\inc\corecrt_internal.h (980): app_unit_test.exe!__acrt_lock_and_call<<lambda_6e4b09c48022b2350581041d5f6b0c4c> >()
minkernel\crts\ucrt\src\appcrt\startup\exit.cpp (259): app_unit_test.exe!common_exit()
minkernel\crts\ucrt\src\appcrt\startup\exit.cpp (294): app_unit_test.exe!exit()
d:\a01_work\43\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl (297): app_unit_test.exe!__scrt_common_main_seh()
d:\a01_work\43\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl (331): app_unit_test.exe!__scrt_common_main()
d:\a01_work\43\s\src\vctools\crt\vcstartup\src\startup\exe_main.cpp (17): app_unit_test.exe!mainCRTStartup()
KERNEL32.DLL!BaseThreadInitThunk() + 0x14 bytes
ntdll.dll!RtlUserThreadStart() + 0x21 bytes
Data:
FF FF FF FF FF FF FF FF FF FF FF FF 00 00 00 00 ........ ........
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
D0 07 00 02 00 00 00 00 ........ ........

Visual Leak Detector detected 4 memory leaks (352 bytes).
Largest number used: 40773 bytes.
Total allocations: 127947 bytes.
Visual Leak Detector is now exiting.

Revisit false-positives in static initialization

Ideally VLD should detect this leak:

#include <stdlib.h>
static void* v = malloc(1); // allocation of raw pointer, no automatic free
int main()
{
    // do something with v
    return 0;
}

But should not detect this:

#include <string>
static std::string s("my string"); // allocates string but destructor will be called at exit
int main()
{
    // something using s
    return 0;
}

The current solution will not detect either of those cases as leaks.

We could do better by seeing static initializations with constructors in the stack and assuming that destructors will be called. That is slightly more complex than the existing logic, but could be done without too much difficulty. Then we could still consider the code above a leak, that could be "fixed" with an explicit free call.

LINK warning from VS 2022

LINK : warning LNK4281: undesirable base address 0x3200000 for x64 image; set base address above 4GB for best ASLR optimization

What was the reason to use specific base address 0x3200000?

Should it be changed to anything else for x64?

Some details from Microsoft: here

VLD crashed application on Windows 10 x86

Hello,
We have the application that launch many (~30) times with different params from one script.
Application do its job in notime, so lauching happend rigth one after another, consequentially

Crash happend randomly and only on x86 version.
We tried to manged the problem by ourselves by failed.

Could you us... May be you know where can be the problem and what exactly go wrong

This what we know from windows EventViewer:

Faulting Application Name: ApcGenConsole.exe, Version: 8.3.49620.0, Timestamp: 0x60006858
Faulting module name: vld_x86.dll, version: 2.6.0.0, timestamp: 0x600062b1
Exception code: 0xc0000005
Error offset: 0x00047ab6
Faulting Process ID: 0x8d08
Faulting application start time: 0x01d6ea8da2ffe75f
Faulting Application Path: C: \ ApcCodeGen \ ApcGenConsole.exe
Faulting module path: C: \ ApcCodeGen \ vld_x86.dll
Report ID: 47305d04-1a8d-4450-8716-7964682b12b9
Bad package full name:
Application code associated with the failing package:

So it crash without any stack or debug information and we can't debug by any tools.
We know it crashed in LPVOID FindRealCode(LPVOID pCode)
-> if (*(WORD *)pCode == 0x25ff) // JMP r/m32
pCode becomes invalid, so we get exception.

we tried to fix it by additional checks:

  1. utility.cpp if ((idte == NULL) || (idte->OriginalFirstThunk == 0)) {

  2. utility.cpp for (; origThunk->u1.Function != NULL && thunk->u1.Function != NULL;
    origThunk++, thunk++)

But all this have no use...

No leaks reported when using QueryVirtualMemoryInformation

Hi,
I installed version 2.5.6. This simple code reported no leaks:

#include <vld.h>
int main()
{
	void* v = new int{1};
}

If I apply the below change in utility.cpp it is fixed (in other words, revert part of the change done on the 19th of November 2020):

image

Am I missing something, or is this just plain wrong?

Thanks!
Alex

Memory leak reported but without a stack trace

VLD is reporting a new memory leak in my application, but it's not printing a stack trace:

---------- Block 10036 at 0x000000000A504E50: 128 bytes ----------
  Leak Hash: 0x24C6814E, Count: 1, Total 128 bytes
  Call Stack (TID 26508):
  Data:
    D0 6E 57 0A    00 00 00 00    F0 F4 6E 0A    00 00 00 00     .nW..... ..n.....
    B0 76 57 0A    00 00 00 00    B0 68 57 0A    00 00 00 00     .vW..... .hW.....
    30 FD 6E 0A    00 00 00 00    40 76 57 0A    00 00 00 00     0.n..... @vW.....
    20 69 57 0A    00 00 00 00    50 79 57 0A    00 00 00 00     .iW..... PyW.....
    50 FE 6E 0A    00 00 00 00    E0 78 57 0A    00 00 00 00     P.n..... .xW.....
    A0 6C 57 0A    00 00 00 00    80 7B 57 0A    00 00 00 00     .lW..... .{W.....
    F0 FA 6E 0A    00 00 00 00    F0 66 57 0A    00 00 00 00     ..n..... .fW.....
    C0 80 57 0A    00 00 00 00    40 6F 57 0A    00 00 00 00     ..W..... @oW.....

Is there anything I can to do the get a stack trace for this block, or find out where it was allocated without one?

Thanks, David

Performance issue in release mode caused by FindRealCode

Hi, thanks for fixing the issue of bad restore in this PR(PR(#10))!

However, according to test on my own project using VLD containing this fix, it seems that performance may be influenced under release mode.

  • Below table gives time consuming while checking memory leak on my project under debug and release mode.

timeconsuming

  • Afterwards, I used the tool in Visual Studio 2019 16.11.9, Debug -> Performance profiler, to run the first case in the upper table and got the following snapshots:
    image
    image

It seems that two added functions VLDVirtualProtect and VLDVirtualProtect in this PR are frequently called by function FindRealCode and this may harm performance.

Would please help me to verify this issue?

VirtualProtect failed error messages

469: !!! VirtualProtect FAILED when protecting for address=00007FFE810F396E, size=8, with GetLastError()=487, protect_handle->address=00007FFE810F396E, protect_handle->size=8
469: !!! VirtualProtect FAILED when protecting for address=00007FFE810F396E, size=8, with GetLastError()=487, protect_handle->address=00007FFE810F396E, protect_handle->size=8
469: !!! VirtualProtect FAILED when protecting for address=00007FFE810F396E, size=8, with GetLastError()=487, protect_handle->address=00007FFE810F396E, protect_handle->size=8
469: !!! VirtualProtect FAILED when protecting for address=00007FFE810F396E, size=8, with GetLastError()=487, protect_handle->address=00007FFE810F396E, protect_handle->size=8
469: !!! VirtualProtect FAILED when protecting for address=00007FFE810F396E, size=8, with GetLastError()=487, protect_handle->address=00007FFE810F396E, protect_handle->size=8
469: !!! VirtualProtect FAILED when protecting for address=00007FFE810F396E, size=8, with GetLastError()=487, protect_handle->address=00007FFE810F396E, protect_handle->size=8
469: !!! VirtualProtect FAILED when protecting for address=00007FFE810F396E, size=8, with GetLastError()=487, protect_handle->address=00007FFE810F396E, protect_handle->size=8
469: !!! VirtualProtect FAILED when protecting for address=00007FFE810F396E, size=8, with GetLastError()=487, protect_handle->address=00007FFE810F396E, protect_handle->size=8

False negative result on configuration Debug|Win32

Test code (main.cpp):

#include <vld.h>
int main()
{
    int* x = new int[20];
    x[0] = 25;
}
VS Project file (test.vcxproj)
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <ItemGroup Label="ProjectConfigurations">
    <ProjectConfiguration Include="Debug|Win32">
      <Configuration>Debug</Configuration>
      <Platform>Win32</Platform>
    </ProjectConfiguration>
    <ProjectConfiguration Include="Release|Win32">
      <Configuration>Release</Configuration>
      <Platform>Win32</Platform>
    </ProjectConfiguration>
    <ProjectConfiguration Include="Debug|x64">
      <Configuration>Debug</Configuration>
      <Platform>x64</Platform>
    </ProjectConfiguration>
    <ProjectConfiguration Include="Release|x64">
      <Configuration>Release</Configuration>
      <Platform>x64</Platform>
    </ProjectConfiguration>
  </ItemGroup>
  <PropertyGroup Label="Globals">
    <VCProjectVersion>16.0</VCProjectVersion>
    <Keyword>Win32Proj</Keyword>
    <ProjectGuid>{a3ce2794-97ae-4c58-9d13-54d7a0b8e462}</ProjectGuid>
    <RootNamespace>TestCyrilic</RootNamespace>
    <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
  </PropertyGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
    <ConfigurationType>Application</ConfigurationType>
    <UseDebugLibraries>true</UseDebugLibraries>
    <PlatformToolset>v142</PlatformToolset>
    <CharacterSet>Unicode</CharacterSet>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
    <ConfigurationType>Application</ConfigurationType>
    <UseDebugLibraries>false</UseDebugLibraries>
    <PlatformToolset>v142</PlatformToolset>
    <WholeProgramOptimization>true</WholeProgramOptimization>
    <CharacterSet>Unicode</CharacterSet>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
    <ConfigurationType>Application</ConfigurationType>
    <UseDebugLibraries>true</UseDebugLibraries>
    <PlatformToolset>v142</PlatformToolset>
    <CharacterSet>Unicode</CharacterSet>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
    <ConfigurationType>Application</ConfigurationType>
    <UseDebugLibraries>false</UseDebugLibraries>
    <PlatformToolset>v142</PlatformToolset>
    <WholeProgramOptimization>true</WholeProgramOptimization>
    <CharacterSet>Unicode</CharacterSet>
  </PropertyGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
  <ImportGroup Label="ExtensionSettings">
  </ImportGroup>
  <ImportGroup Label="Shared">
  </ImportGroup>
  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
  </ImportGroup>
  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
  </ImportGroup>
  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
  </ImportGroup>
  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
  </ImportGroup>
  <PropertyGroup Label="UserMacros" />
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
    <LinkIncremental>true</LinkIncremental>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    <LinkIncremental>false</LinkIncremental>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
    <LinkIncremental>true</LinkIncremental>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
    <LinkIncremental>false</LinkIncremental>
  </PropertyGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
    <ClCompile>
      <WarningLevel>Level3</WarningLevel>
      <SDLCheck>true</SDLCheck>
      <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
      <ConformanceMode>true</ConformanceMode>
    </ClCompile>
    <Link>
      <SubSystem>Console</SubSystem>
      <GenerateDebugInformation>true</GenerateDebugInformation>
    </Link>
  </ItemDefinitionGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    <ClCompile>
      <WarningLevel>Level3</WarningLevel>
      <FunctionLevelLinking>true</FunctionLevelLinking>
      <IntrinsicFunctions>true</IntrinsicFunctions>
      <SDLCheck>true</SDLCheck>
      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
      <ConformanceMode>true</ConformanceMode>
    </ClCompile>
    <Link>
      <SubSystem>Console</SubSystem>
      <EnableCOMDATFolding>true</EnableCOMDATFolding>
      <OptimizeReferences>true</OptimizeReferences>
      <GenerateDebugInformation>true</GenerateDebugInformation>
    </Link>
  </ItemDefinitionGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
    <ClCompile>
      <WarningLevel>Level3</WarningLevel>
      <SDLCheck>true</SDLCheck>
      <PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
      <ConformanceMode>true</ConformanceMode>
    </ClCompile>
    <Link>
      <SubSystem>Console</SubSystem>
      <GenerateDebugInformation>true</GenerateDebugInformation>
    </Link>
  </ItemDefinitionGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
    <ClCompile>
      <WarningLevel>Level3</WarningLevel>
      <FunctionLevelLinking>true</FunctionLevelLinking>
      <IntrinsicFunctions>true</IntrinsicFunctions>
      <SDLCheck>true</SDLCheck>
      <PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
      <ConformanceMode>true</ConformanceMode>
    </ClCompile>
    <Link>
      <SubSystem>Console</SubSystem>
      <EnableCOMDATFolding>true</EnableCOMDATFolding>
      <OptimizeReferences>true</OptimizeReferences>
      <GenerateDebugInformation>true</GenerateDebugInformation>
    </Link>
  </ItemDefinitionGroup>
  <ItemGroup>
    <ClCompile Include="main.cpp" />
  </ItemGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
  <ImportGroup Label="ExtensionTargets">
  </ImportGroup>
</Project>

Output:

Visual Leak Detector read settings from: C:\Program Files (x86)\Visual Leak Detector\vld.ini
Visual Leak Detector Version 2.5.8 installed.
No memory leaks detected.
Visual Leak Detector is now exiting.

████████████████████████████████\test.exe (process 2100) exited with code 0.
To automatically close the console when debugging stops, enable Tools->Options->Debugging->Automatically close the console when debugging stops.
Press any key to close this window . . .
VS info
Microsoft Visual Studio Community 2022
Version 17.0.5
VisualStudio.17.Release/17.0.5+32112.339
Microsoft .NET Framework
Version 4.8.04084

Installed Version: Community

Visual C++ 2022   00482-90000-00000-AA087
Microsoft Visual C++ 2022

ASP.NET and Web Tools 2019   17.0.795.42246
ASP.NET and Web Tools 2019

C# Tools   4.0.1-1.21568.1+6ab6601178d9fba8c680b56934cd1742e0816bff
C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Microsoft JVM Debugger   1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines

Microsoft MI-Based Debugger   1.0
Provides support for connecting Visual Studio to MI compatible debuggers

Microsoft Visual C++ Wizards   1.0
Microsoft Visual C++ Wizards

Microsoft Visual Studio VC Package   1.0
Microsoft Visual Studio VC Package

NuGet Package Manager   6.0.1
NuGet Package Manager in Visual Studio. For more information about NuGet, visit https://docs.nuget.org/

ProjectServicesPackage Extension   1.0
ProjectServicesPackage Visual Studio Extension Detailed Info

Test Adapter for Boost.Test   1.0
Enables Visual Studio's testing tools with unit tests written for Boost.Test.  The use terms and Third Party Notices are available in the extension installation directory.

Test Adapter for Google Test   1.0
Enables Visual Studio's testing tools with unit tests written for Google Test.  The use terms and Third Party Notices are available in the extension installation directory.

TypeScript Tools   17.0.1001.2002
TypeScript Tools for Microsoft Visual Studio

Visual Basic Tools   4.0.1-1.21568.1+6ab6601178d9fba8c680b56934cd1742e0816bff
Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Visual Studio Code Debug Adapter Host Package   1.0
Interop layer for hosting Visual Studio Code debug adapters in Visual Studio

Visual Studio IntelliCode   2.2
AI-assisted development for Visual Studio.

Visual Studio Tools for CMake   1.0
Visual Studio Tools for CMake

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.