clang-cl.exe is more useful than cl.exe, awesome. when build address sanitizer add -EnableAsan -Compiler=Clang to Build.bat or Rebuild.bat.
First:
//modify VCToolChain.cs and build UBT first.
if (Target.WindowsPlatform.Compiler.IsClang())
{
Arguments.Add("-fsanitize=address");
Arguments.Add("-fno-sanitize-address-use-after-scope");
}
Second:
//BuildWinAsan.bat with the commandline.
cd Engine\Build\BatchFiles
Build.bat TP Win64 Shipping ..\..\TP.uproject -waitmutex -EnableAsan -Compiler=Clang
Last :
//Before run TPClient.exe add ASAN_OPTIONS first.
set ASAN_OPTIONS=log_path=asan.report
Thanks for Dark-Veil
EX: