Address sanitizer for MSVC

MSVC has a native address sanitizer. But the -fsanitize=address and /RTC1 settings are exclusive (cf. Runtime chesk and Address Sanitizer are disabled )

/RTC1 setting comes from the Modules/Platform/Windows-MSVC.cmake:236 . Modifying the default option is a bit hard and tedious thing.

Is there any easy way to turn-on the ASan for MSVC via CMake?

This issue is related, but is Visual Studio-specific. We would likely need a different codepath for non-Visual Studio MSVC-using builds though.

Cc: @brad.king @bill.hoffman

Will be fixed in the next version of MSVC :thinking:

1 Like