Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
170 commits
Select commit Hold shift + click to select a range
489eba9
Reverted change in utility.cpp that caused memory leaks not to be rep…
grrava Mar 9, 2022
7566f13
made new build with current windows sdk, improved error reporting a bit
grrava Apr 11, 2023
35ba1c3
updated to innosetup 6
grrava Apr 12, 2023
a9e568e
Merge branch 'master' of https://github.com/Azure/vld into Azure-master
grrava Jan 3, 2024
67377aa
Merge branch 'Azure-master'
grrava Jan 3, 2024
3e46ec8
Update README.md
avadae Jan 3, 2024
0b2998c
Merge pull request #2 from Azure/master
avadae Nov 19, 2024
0b79073
Removed obsolete sln file
grrava Nov 19, 2024
73bb73d
Create msbuild.yml
avadae Nov 19, 2024
926097d
Update msbuild.yml
avadae Nov 19, 2024
55a3ff0
Changed platform toolset to v143
grrava Nov 19, 2024
923bc9a
Update msbuild.yml
avadae Nov 19, 2024
a739ae0
Update msbuild.yml
grrava Nov 19, 2024
f393c9e
Update msbuild.yml
grrava Nov 19, 2024
b5f6b8a
Allow MyAppVersion to be set via the command line
grrava Nov 19, 2024
15382ad
Update msbuild.yml
grrava Nov 19, 2024
484dba7
Update msbuild.yml
grrava Nov 19, 2024
ddc75a6
Update msbuild.yml
grrava Nov 19, 2024
4561839
Removed override of version number
grrava Nov 19, 2024
3bf9716
Update README.md
grrava Nov 19, 2024
b657455
Update README.md
grrava Nov 19, 2024
b585a7f
Update README.md
grrava Nov 19, 2024
360c177
Update README.md
avadae Nov 21, 2024
6b3a8d5
Added some gtests to see if we can run them with github actions
grrava Nov 26, 2024
15c3169
Merge branch 'master' of https://github.com/avadae/vld
grrava Nov 26, 2024
e0cd7d3
Fixed project configuration
grrava Nov 26, 2024
dfbb0b4
Updated paths in innosetup installer
grrava Nov 26, 2024
d99f721
Updated tests to vs 2022
grrava Nov 27, 2024
961058a
Converted more tests
grrava Nov 28, 2024
05d3825
Removed obsolete project
grrava Nov 28, 2024
60d3c0b
Create dev_test.yml
grrava Nov 28, 2024
d1d959f
Removed whiteline to check build process
grrava Nov 28, 2024
1f20991
Merge branch 'master' into dev
grrava Nov 28, 2024
d0a757e
Update dev_test.yml
avadae Nov 28, 2024
491b48a
Update dev_test.yml
avadae Nov 28, 2024
a718193
Update dev_test.yml
avadae Nov 29, 2024
1746a74
Remade the Debug(Release) target
grrava Nov 29, 2024
2afc0ce
Update dev_test.yml
grrava Nov 29, 2024
cd84bb7
Update dev_test.yml
grrava Nov 29, 2024
7192d97
Removed project dependencies because msbuild complains about missing …
grrava Nov 29, 2024
d57a00a
Update dev_test.yml
avadae Nov 29, 2024
66e703e
Some debug output to see what's going on in the github actions
grrava Nov 29, 2024
b84f99d
Debug(Release) build target has been added to all projects
grrava Nov 29, 2024
7b466c5
No copies need for these three projects
grrava Nov 29, 2024
8d4fe56
Need more configurations
grrava Nov 29, 2024
f70c0ab
Missed the Win32 again
grrava Nov 29, 2024
1b19103
Update dev_test.yml
avadae Nov 29, 2024
81b1c94
Update dev_test.yml
avadae Nov 29, 2024
09bc45d
Attempt to convert to native unit tests
grrava Dec 2, 2024
3428455
[ava] added build config
grrava Dec 2, 2024
56641bb
Small progress on tests
grrava Dec 4, 2024
d6ee118
Progress on tests
grrava Dec 5, 2024
55586fe
Merge branch 'dev' of https://github.com/avadae/vld into dev
grrava Dec 5, 2024
0d9da7d
Update dev_test.yml
avadae Dec 5, 2024
37544e6
Update dev_test.yml
avadae Dec 5, 2024
491ad27
removed project configs
grrava Dec 5, 2024
1735125
Update dev_test.yml
avadae Dec 6, 2024
e5d7301
Build fix - threads did not have the test props yet
grrava Dec 6, 2024
c936d53
Different action to run the tests
avadae Dec 6, 2024
60034fc
Test to see if vstest isn't available by default
avadae Dec 6, 2024
d62f8a0
Update dev_test.yml
avadae Dec 6, 2024
b95e94c
Test fix
grrava Dec 6, 2024
e072e38
Updated msbuild action + added test
avadae Dec 6, 2024
d7ce574
Test fix - had an incorrect project config
grrava Dec 6, 2024
e936e2a
Update dev_test.yml
avadae Dec 6, 2024
4d0bd44
Test fix + start of new ignore_functions test
grrava Dec 6, 2024
bb7673b
Added ignore_functions test
grrava Dec 6, 2024
4f23191
Added Win32 build and tests
avadae Dec 6, 2024
18ef41a
Config change so win32 tests are correctly build
grrava Dec 6, 2024
4d8b6af
Merge branch 'dev' of https://github.com/avadae/vld into dev
grrava Dec 6, 2024
987c94f
Potential fix for the win32 tests
grrava Dec 6, 2024
9780aa4
Cleaned up obsolete gtest projects and renamed base test project
grrava Dec 6, 2024
f4bb595
Update dev_test.yml
avadae Dec 6, 2024
be2549c
Build fix - we can't use build dependencies in visual studio because …
grrava Dec 6, 2024
ffe696b
Merge branch 'dev' of https://github.com/avadae/vld into dev
grrava Dec 6, 2024
d52ab3c
Updated dbghelp.dll to latest (10.0.26100.1742)
grrava Dec 7, 2024
f0376d2
Documented the process to update dbghelp.dll, took me a whil to figur…
grrava Dec 7, 2024
19650ff
Fixed and ignored some warnings
grrava Dec 7, 2024
2326fab
Renamed dbghelp.h to avoid possible confusion
grrava Dec 8, 2024
eb7d6fa
Added installer build to dev workflow too
avadae Dec 8, 2024
0c59b08
Added script to update version number
grrava Dec 8, 2024
5084fd6
Update version numbers in vld dll too
avadae Dec 8, 2024
84e702c
The new dbghelp.dll caused the init routine to be called during SymIn…
grrava Dec 8, 2024
e4d0338
Changed project config to test mfc project
grrava Dec 11, 2024
c999abb
Prepared files for conversion to c++20
grrava Dec 12, 2024
fc53a11
Fixed gitversion version
avadae Dec 12, 2024
c4a754d
Modern dll entry
grrava Dec 12, 2024
ddc0e49
Merge branch 'dev' of https://github.com/avadae/vld into dev
grrava Dec 12, 2024
917c954
Fixed incorrect static string usage
grrava Dec 15, 2024
de21f59
Fix for unit tests, the dllmain was not functional!
grrava Dec 15, 2024
5093cc1
Enabled 3rd vld_unload test
grrava Dec 15, 2024
a80785e
Converted some critical sections to std::mutexes
grrava Dec 15, 2024
71f940a
converted to scoped locks, potentially fixed a deadlock
grrava Dec 15, 2024
074844b
Fixed warnings
grrava Dec 15, 2024
e87648c
Reverted back to cs instead of mutex
grrava Dec 16, 2024
c20414f
Disabled the vld_unload tests until we fixed them
avadae Dec 16, 2024
79f0ab7
Deadlock fix
grrava Dec 21, 2024
29ad173
Enabled vld_unload tests again
avadae Dec 21, 2024
2d3eabd
Disabled test3, there is still a deadlock there.
grrava Dec 21, 2024
c3f5757
Merge branch 'dev' of https://github.com/avadae/vld into dev
grrava Dec 21, 2024
9ea8b90
Ignore test results folder
grrava Dec 21, 2024
08897db
Publish test results
avadae Dec 21, 2024
4fbdedf
Merge branch 'dev' of https://github.com/avadae/vld into dev
grrava Dec 21, 2024
63c0af7
Update dev_test.yml
avadae Dec 21, 2024
decb209
Merge branch 'dev' of https://github.com/avadae/vld into dev
grrava Dec 21, 2024
3d5c873
Update dev_test.yml
avadae Dec 21, 2024
53fd64d
Merge branch 'dev' of https://github.com/avadae/vld into dev
grrava Dec 21, 2024
ec5a4fc
No deferred loads, so a loader lock is not needed when finding symbol…
grrava Dec 21, 2024
11f95ad
Update dev_test.yml
avadae Dec 21, 2024
af92963
Update dev_test.yml
avadae Dec 21, 2024
eaf09b0
Update dev_test.yml
avadae Dec 21, 2024
c027d71
Update dev_test.yml
avadae Dec 21, 2024
dc63402
Update dev_test.yml
avadae Dec 21, 2024
f0cfb7b
Update dev_test.yml
avadae Dec 21, 2024
73ba275
Got rid of the dependency on the cppformat lib
grrava Dec 22, 2024
24cce75
Less verbose when everything is ok
grrava Dec 22, 2024
2060061
Added alternative cs class
grrava Dec 22, 2024
325d10f
Merge branch 'dev' of https://github.com/avadae/vld into dev
grrava Dec 22, 2024
6e1cc42
Added heap corruption test
grrava Dec 22, 2024
02905a1
Added build config for the tests
grrava Dec 22, 2024
12e8875
Added Debug(Release)_StaticCRT test target
grrava Dec 22, 2024
49cfe36
Build and run the new tests
avadae Dec 22, 2024
e5d4431
renamed a step
avadae Dec 22, 2024
308dc10
Update msbuild.yml
avadae Dec 22, 2024
a583d95
Merge pull request #3 from avadae/dev
avadae Dec 22, 2024
39bce6b
Build on tags too
avadae Dec 22, 2024
cf55165
Fixed some warnings, increased to warning level 4, enabled "treat war…
grrava Dec 22, 2024
9c5e8d5
Fixed some threading releated warnings
grrava Dec 22, 2024
9bcd71a
No more project wide ignored warnings
grrava Dec 22, 2024
4711bd3
Reverted change that caused tests to fail + enabled strict waring pol…
grrava Dec 22, 2024
3aa2314
Fixed more warnings
grrava Dec 22, 2024
30e6a31
Fixed warnings, removed cmake files, that was work in progress
grrava Dec 23, 2024
be2259d
First attempt at adding cmake installer
grrava Dec 23, 2024
585b55e
Added zip to build output
avadae Dec 23, 2024
ba16628
Better folder structure
avadae Dec 23, 2024
ceabb80
Progress on cmake - test this
grrava Dec 23, 2024
040dc2c
Update msbuild.yml
avadae Dec 23, 2024
8c930a5
Update msbuild.yml
avadae Dec 23, 2024
e9cc158
Allow use of fetchcontent
grrava Dec 24, 2024
1b5e09c
cmake file improvements
grrava Dec 24, 2024
9d30fe2
Still something wrong with the include folders
grrava Dec 24, 2024
fc15646
Easier setup to use vld with cmake
grrava Dec 24, 2024
604ecf4
Added documentation on how to use vld in cmake projects
grrava Dec 24, 2024
4c9b80a
Removed all gtests that have been translated to native tests + made a…
grrava Dec 25, 2024
fc4375c
Another attempt at using mutexes instead of criticalsections
grrava Dec 25, 2024
a646294
Removed unused include
grrava Dec 25, 2024
a3f2a6d
Converted the heap map lock to a raii based one
grrava Dec 26, 2024
b13b307
Made the heammap lock no longer global
grrava Dec 26, 2024
2cb984b
More usage of std::scoped_lock
grrava Dec 26, 2024
796d63d
Bye bye old critical section class
grrava Dec 26, 2024
b5ee30f
Let's use vld::criticalsection instead of std::mutex everywhere.
grrava Dec 26, 2024
086d4ab
Cleanup criticalsection code
grrava Dec 26, 2024
1788c02
Merge pull request #4 from avadae/dev
avadae Dec 26, 2024
41a25d3
Fixed invalid reporting of thread_local variables.
grrava Dec 29, 2024
5658779
Applied data race fix reported here https://github.com/Azure/vld/pull…
grrava Dec 29, 2024
f9c0d72
Mqade an attempt at fixing the threading issue but failed
grrava Feb 7, 2025
2964c46
Potential fix for https://github.com/Azure/vld/issues/33
grrava May 9, 2025
87e041f
Did I fix the deadlock?
grrava Aug 7, 2025
ee245e5
Update msbuild.yml
avadae Aug 7, 2025
da5eae8
Some extra tests
grrava Aug 7, 2025
9b98320
Update msbuild.yml
grrava Aug 7, 2025
ce500ab
Some output to find teh deadlock on gh
grrava Aug 7, 2025
9f99937
Another test to see if we can get rid of the deadlock
grrava Aug 7, 2025
566fb14
Added symsrv.dll, since it is a documented dependency of dbghelp.dll
grrava Aug 8, 2025
06e2b54
Merge remote-tracking branch 'origin/master' into dev
grrava Aug 8, 2025
9b4d380
Removed obsolete include
grrava Aug 8, 2025
66ea4c7
Small improvement
grrava Aug 8, 2025
2be2c07
Added a test in the hope to detect an issue a student of mine has on …
grrava Aug 9, 2025
0c093ff
Removed project dependency
grrava Aug 9, 2025
ba7471f
Added missing libs
grrava Aug 9, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 0 additions & 23 deletions .editorconfig

This file was deleted.

108 changes: 108 additions & 0 deletions .github/workflows/dev_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
name: TestDevelopment

on:
push:
branches: [ "dev" ]
env:
# Path to the solution file relative to the root of the project.
SOLUTION_FILE_PATH: ./vld.sln

permissions:
contents: read
checks: write

jobs:
build:
runs-on: windows-latest

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v3
with:
versionSpec: '6.0.5'

- name: Determine Version
uses: gittools/actions/gitversion/execute@v3

- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v2

- name: Restore NuGet packages
working-directory: ${{env.GITHUB_WORKSPACE}}
run: nuget restore ${{env.SOLUTION_FILE_PATH}}

- name: Setup VSTest.exe
uses: Malcolmnixon/Setup-VSTest@v4

- name: Update version number in version.h
shell: pwsh
run: |
./update_version.ps1

- name: Build Win64 VLD
working-directory: ${{env.GITHUB_WORKSPACE}}
run: msbuild /m /p:Configuration="Release" /p:Platform=x64 -target:vld ${{env.SOLUTION_FILE_PATH}}

- name: Build Win64 Tests
working-directory: ${{env.GITHUB_WORKSPACE}}
run: msbuild /m /p:Configuration="Debug(Release)" /p:Platform=x64 ${{env.SOLUTION_FILE_PATH}}

- name: Build Win64 StaticCRT Tests
working-directory: ${{env.GITHUB_WORKSPACE}}
run: msbuild /m /p:Configuration="Debug(Release)_StaticCRT" /p:Platform=x64 ${{env.SOLUTION_FILE_PATH}}

- name: Test Win64
run: |
vstest.console '.\bin\tests\x64\debug(release)\vld_tests.dll' /InIsolation /Logger:trx
vstest.console '.\bin\tests\x64\debug(release)\threads.dll' /InIsolation /Logger:trx
vstest.console '.\bin\tests\x64\debug(release)\vld_unload.dll' /InIsolation /Logger:trx
vstest.console '.\bin\tests\x64\debug(release)_staticcrt\vld_tests.dll' /InIsolation /Logger:trx
vstest.console '.\bin\tests\x64\debug(release)_staticcrt\threads.dll' /InIsolation /Logger:trx
vstest.console '.\bin\tests\x64\debug(release)_staticcrt\vld_unload.dll' /InIsolation /Logger:trx

- name: Build Win32 VLD
working-directory: ${{env.GITHUB_WORKSPACE}}
run: msbuild /m /p:Configuration="Release" /p:Platform=Win32 -target:vld ${{env.SOLUTION_FILE_PATH}}

- name: Build Win32 Tests
working-directory: ${{env.GITHUB_WORKSPACE}}
run: msbuild /m /p:Configuration="Debug(Release)" /p:Platform=Win32 ${{env.SOLUTION_FILE_PATH}}

- name: Build Win32 StaticCRT Tests
working-directory: ${{env.GITHUB_WORKSPACE}}
run: msbuild /m /p:Configuration="Debug(Release)_StaticCRT" /p:Platform=Win32 ${{env.SOLUTION_FILE_PATH}}

- name: Test Win32
run: |
vstest.console '.\bin\tests\win32\debug(release)\vld_tests.dll' /InIsolation /Logger:trx
vstest.console '.\bin\tests\win32\debug(release)\threads.dll' /InIsolation /Logger:trx
vstest.console '.\bin\tests\win32\debug(release)\vld_unload.dll' /InIsolation /Logger:trx
vstest.console '.\bin\tests\win32\debug(release)_staticcrt\vld_tests.dll' /InIsolation /Logger:trx
vstest.console '.\bin\tests\win32\debug(release)_staticcrt\threads.dll' /InIsolation /Logger:trx
vstest.console '.\bin\tests\win32\debug(release)_staticcrt\vld_unload.dll' /InIsolation /Logger:trx

- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action/windows@v2
if: always()
with:
files: |
TestResults\**\*.trx
comment_mode: off

- name: Create installer
uses: Minionguyjpro/Inno-Setup-Action@v1.2.4
with:
path: ./setup/vld-setup.iss
options: /V0 /O+ /DMyAppVersion=${{ env.GitVersion_MajorMinorPatch }}

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: Installer
path: ./setup/Output/vld-${{ env.GitVersion_MajorMinorPatch }}-setup.exe
retention-days: 1
119 changes: 119 additions & 0 deletions .github/workflows/msbuild.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
name: Build And Test

on:
push:
branches: [ "dev", "master" ]
tags: '*'
paths-ignore:
- '**/README.md'
- '.github/workflows/*'
pull_request:
branches: [ "master" ]

env:
# Path to the solution file relative to the root of the project.
SOLUTION_FILE_PATH: ./vld.sln

permissions:
contents: read
checks: write

jobs:
build:
runs-on: windows-latest

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v3
with:
versionSpec: '6.0.5'

- name: Determine Version
uses: gittools/actions/gitversion/execute@v3

- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v2

- name: Restore NuGet packages
working-directory: ${{env.GITHUB_WORKSPACE}}
run: nuget restore ${{env.SOLUTION_FILE_PATH}}

- name: Setup VSTest.exe
uses: Malcolmnixon/Setup-VSTest@v4

- name: Update version number in version.h
shell: pwsh
run: |
./update_version.ps1

- name: Add Debugging Tools to PATH
run: |
echo "C:\Program Files (x86)\Windows Kits\10\Debuggers\x64" >> $env:GITHUB_PATH

- name: Build Win64 VLD
working-directory: ${{env.GITHUB_WORKSPACE}}
run: msbuild /m /p:Configuration="Release" /p:Platform=x64 -target:vld ${{env.SOLUTION_FILE_PATH}}

- name: Build Win64 Tests
working-directory: ${{env.GITHUB_WORKSPACE}}
run: msbuild /m /p:Configuration="Debug(Release)" /p:Platform=x64 ${{env.SOLUTION_FILE_PATH}}

- name: Build Win64 StaticCRT Tests
working-directory: ${{env.GITHUB_WORKSPACE}}
run: msbuild /m /p:Configuration="Debug(Release)_StaticCRT" /p:Platform=x64 ${{env.SOLUTION_FILE_PATH}}

- name: Test Win64
run: |
vstest.console '.\bin\tests\x64\debug(release)\vld_tests.dll' /InIsolation /Logger:trx
vstest.console '.\bin\tests\x64\debug(release)\threads.dll' /InIsolation /Logger:trx
vstest.console '.\bin\tests\x64\debug(release)\vld_unload.dll' /InIsolation /Logger:trx
vstest.console '.\bin\tests\x64\debug(release)_staticcrt\vld_tests.dll' /InIsolation /Logger:trx
vstest.console '.\bin\tests\x64\debug(release)_staticcrt\threads.dll' /InIsolation /Logger:trx
vstest.console '.\bin\tests\x64\debug(release)_staticcrt\vld_unload.dll' /InIsolation /Logger:trx

- name: Build Win32 VLD
working-directory: ${{env.GITHUB_WORKSPACE}}
run: msbuild /m /p:Configuration="Release" /p:Platform=Win32 -target:vld ${{env.SOLUTION_FILE_PATH}}

- name: Build Win32 Tests
working-directory: ${{env.GITHUB_WORKSPACE}}
run: msbuild /m /p:Configuration="Debug(Release)" /p:Platform=Win32 ${{env.SOLUTION_FILE_PATH}}

- name: Build Win32 StaticCRT Tests
working-directory: ${{env.GITHUB_WORKSPACE}}
run: msbuild /m /p:Configuration="Debug(Release)_StaticCRT" /p:Platform=Win32 ${{env.SOLUTION_FILE_PATH}}

- name: Test Win32
run: |
vstest.console '.\bin\tests\win32\debug(release)\vld_tests.dll' /InIsolation /Logger:trx
vstest.console '.\bin\tests\win32\debug(release)\threads.dll' /InIsolation /Logger:trx
vstest.console '.\bin\tests\win32\debug(release)\vld_unload.dll' /InIsolation /Logger:trx
vstest.console '.\bin\tests\win32\debug(release)_staticcrt\vld_tests.dll' /InIsolation /Logger:trx
vstest.console '.\bin\tests\win32\debug(release)_staticcrt\threads.dll' /InIsolation /Logger:trx
vstest.console '.\bin\tests\win32\debug(release)_staticcrt\vld_unload.dll' /InIsolation /Logger:trx

- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action/windows@v2
if: always()
with:
files: |
TestResults\**\*.trx
comment_mode: off

- name: Create installer
uses: Minionguyjpro/Inno-Setup-Action@v1.2.4
with:
path: ./setup/vld-setup.iss
options: /V0 /O+ /DMyAppVersion=${{ env.GitVersion_MajorMinorPatch }}

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: Installer
path: ./setup/Output/vld-${{ env.GitVersion_MajorMinorPatch }}-setup.exe
retention-days: 1
15 changes: 12 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
obj/

Debug/
Debug (Unicode)/
Debug(Release)/
Debug(Release)_StaticCRT/
Release/
Release (Unicode)/

Win32/
x64/

*.vcxproj.user
*.*sdf
*.suo
Expand All @@ -21,4 +24,10 @@ src/bin/vld.ini
*.VC.opendb
*.VC.db
*.aps
.vs/
.vs/
packages/
TestResults/
build/

!setup/dbghelp/x64/
!lib/sdl2/lib/x64/
55 changes: 32 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,47 @@
# Visual Leak Detector [![Build status](https://ci.appveyor.com/api/projects/status/0kvft8un16e80toj/branch/master?svg=true)](https://ci.appveyor.com/project/KindDragon/vld/branch/master) <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&amp;business=N3QTYHP9LH6UY&amp;lc=GB&amp;item_name=Visual%20Leak%20Detector&amp;currency_code=USD&amp;bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHosted" target="_blank"><img src="https://img.shields.io/badge/paypal-donate-yellow.svg" alt="PayPal donate button" /></a>
# Visual Leak Detector

## Microsoft Fork
[![Build Status](https://github.com/avadae/vld/actions/workflows/msbuild.yml/badge.svg)](https://github.com/avadae/msbuild/actions)
[![GitHub Release](https://img.shields.io/github/v/release/avadae/vld?logo=github&sort=semver)](https://github.com/avadae/vld/releases/latest)

This fork was created to address some of the issues found in the original repo [https://github.com/KindDragon/vld](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.
## This personal fork

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.
I maintain this fork to be used by students at [Hogeschool West-Vlaanderen in the bachelor Digital Arts and Entertainment](https://www.digitalartsandentertainment.be/). It is created to keep the vld project up to date with the latest visual studio versions and the latest installer tools. We merge all changes applied to the original Azure fork into this one. Please refer to [https://github.com/Azure/vld](https://github.com/Azure/vld) for the original version.

## Introduction
## Documentation

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:
Find the original documentation at [https://github.com/KindDragon/vld/wiki](https://github.com/KindDragon/vld/wiki) however it is outdated.

* 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.
## Using VLD in Cmake projects

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.
Starting version 2.5.11 you can easily use vld in cmake configured projects. Install VLD as usual. Then in your CMakeLists.txt you can write

Visual Leak Detector is [licensed][3] 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][1]. Or, if you'd prefer, you can [contribute a small donation][2]. Both are very appreciated.
```
find_package(VLD CONFIG)

## Documentation
target_include_directories(your_target PRIVATE ${VLD_INCLUDE_DIRS})
target_link_libraries(your_target PRIVATE ${VLD_LIBRARIES})
```

In your main.cpp (or other initial file for your exe/dll) add

```
#if _DEBUG
#if __has_include(<vld.h>)
#include <vld.h>
#endif
#endif
```

Read the documentation at [https://github.com/KindDragon/vld/wiki](https://github.com/KindDragon/vld/wiki)
And you're good to go! If VLD is installed the project will be checked for leaks. If VLD is not installed the project still builds and leaks will be undetected.

## 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.
## Updating dbghelp.dll

* [Source code](https://github.com/KindDragon/vld)
* [Microsoft fork code](https://github.com/Azure/vld)
If you want to update the version of DbgHelp.dll in the project

Copyright © 2005-2017 VLD Team
- [Install the desired Windows SDK version.](https://developer.microsoft.com/en-us/windows/downloads/sdk-archive/)
- Copy dbghelp.dll from ```C:\Program Files (x86)\Windows Kits\10\Debuggers\x64``` to ```vld\setup\dbghelp\x64```
- Copy dbghelp.dll from ```C:\Program Files (x86)\Windows Kits\10\Debuggers\x86``` to ```vld\setup\dbghelp\x86```
- Update the version number in the manifest files in those folders
- Important: update the version number in the two dependency manifest files in ```vld\src```

[1]: https://github.com/KindDragon/vld/wiki
[2]: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=N3QTYHP9LH6UY&lc=GB&item_name=Visual%20Leak%20Detector&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHosted
[3]: https://github.com/KindDragon/vld/blob/master/COPYING.txt
Loading