Comments (1)
Well, there is an easy solution to prevent SymInitialize() from calling SymLoadModuleExW( ).
Just add a global bool variable to indicate that we are calling SymInitialize().
Tested working with: VS2019 + Win11 insider dev channel + c:\windows\system32\dbghelp.dll.
Rember to remove "vld.dll.dependency.x64.manifest" and "dbghelp.dll" and "Microsoft.DTfW.DHL.manifest" from vld project
settings to use c:\windows\system32\dbghelp.dll which is version 10.0.
dbghelp.h:
extern volatile bool init;
BOOL SymInitializeW(_In_ HANDLE hProcess, _In_opt_ PCWSTR UserSearchPath, _In_ BOOL fInvadeProcess) {
init = true;
CriticalSectionLocker<CriticalSection> cs(m_lock);
const auto r = ::SymInitializeW(hProcess, UserSearchPath, fInvadeProcess);
init = false;
return r;
}
vld.cpp
volatile bool init = false;
typedef BOOLEAN(NTAPI *PDLL_INIT_ROUTINE)(IN PVOID DllHandle, IN ULONG Reason, IN PCONTEXT Context OPTIONAL);
BOOLEAN WINAPI LdrpCallInitRoutine(IN PVOID BaseAddress, IN ULONG Reason, IN PVOID Context, IN PDLL_INIT_ROUTINE EntryPoint)
{
LoaderLock ll;
if (Reason == DLL_PROCESS_ATTACH) {
if (!init)
g_vld.RefreshModules();
}
return EntryPoint(BaseAddress, Reason, (PCONTEXT)Context);
}
from vld.
Related Issues (20)
- Failing Build
- So the project was dead
- Vld included and compiled successfully, and activated (vld.ini) but no report is generated. with Visual Studio 2012.
- Failed to install 2.5.1 version on Windows7 32-bit system HOT 1
- False positives detected for static member std::string
- False positive report with thread_local
- Application fails to run when linked to VLD
- VLD for VS 2017 / 2019 and older
- Is it possible to configure ReportFile name to be executable name automatically?
- Documentation says #include vld.h must be after stdafx.h, but fatal error is thrown if I do HOT 3
- Multiply defined symbols
- VLD 2.5.1 report false positive on Visual Studio 2017, MFC, Window 10 HOT 2
- How do I uninstall this thing? HOT 4
- run failed in window server 2016 and vs 2013 HOT 1
- Leaks reported in STL containers like vectors, map HOT 1
- Leack Location not display on Output window
- Please add support for Visual Studio 2022 all editions HOT 3
- What's the status of this project? HOT 4
- Don't see the Visual Leak Detector in VS
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vld.