Advanced Build and Debugging - openstudiocoalition/OpenStudioApplication GitHub Wiki
Address Sanitizer
Address sanitizers can be used to find memory allocation errors.
Windows
- 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.