-
Notifications
You must be signed in to change notification settings - Fork 25
Advanced Build and Debugging
Dan Macumber edited this page Nov 23, 2021
·
1 revision
Address sanitizers can be used to find memory allocation errors.
- Install the ASAN and Clang/LLVM tools with Visual Studio
- Build with
/fsanitize=addressaccording to https://docs.microsoft.com/en-us/cpp/sanitizers/asan?view=msvc-170 - Build
setdllfrom https://github.com/microsoft/Detours - Run
setdll.exe /d:clang_rt.asan_dbg_dynamic-x86_64.dllonopenstudiolib.dll,Qt5WebEngineCored.dll,Qt5WebEngineWidgetsd.dll,Qt5Cored.dll. This loads the ASAN runtime before Qt libraries which allocate memory on load.