MSVC Address Sanitizer: Simplified Configuration and Improved Compatibility
The article discusses the recent changes made to the MSVC Address Sanitizer (ASan) in Visual Studio 2022 version 17.7 Preview 3. Previously, ASan followed the same methodology as the runtime libraries, causing issues for projects that couldn't recompile the host EXE with ASan enabled. However, with the latest update, ASan now depends on one runtime DLL regardless of the runtime configuration, simplifying project onboarding and supporting more scenarios. This change also allows projects statically linked with /MT or /MTd to have a dependency on the ASan runtime DLL. Additionally, there is now one Address Sanitizer DLL per architecture, eliminating the need for different versions of ASan for different runtime configurations. The article also mentions the link time changes (/INFERASANLIBS) and provides troubleshooting tips. These improvements in the MSVC Address Sanitizer provide developers with a simplified configuration process and improved compatibility.