You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Disable ASAN global variable check in vctoolchain when using clang compiler. This can lead to false / positive with ASan mixing types of different size in its shadow space
(for instance, null character being shared for char and wchar_t but having different sizes (1 for char and 2 for wchar_t)) [REVIEW] [at]ben.woodhouse #rnx #rb ben.woodhouse [CL 35467128 by mickael gilabert in ue5-main branch]
This commit is contained in:
@@ -614,6 +614,13 @@ namespace UnrealBuildTool
|
||||
// Works for clang too.
|
||||
Arguments.Add("/fsanitize=address");
|
||||
|
||||
if (Target.WindowsPlatform.Compiler.IsClang())
|
||||
{
|
||||
// Don't check global variables when address sanitizer is enabled. This can lead to false / positive with ASan mixing types of different size in its shadow space
|
||||
// (for instance, null character being shared for char and wchar_t but having different sizes (1 for char and 2 for wchar_t))
|
||||
Arguments.Add("-mllvm -asan-globals=0");
|
||||
}
|
||||
|
||||
// Use the CRT allocator so that ASan is able to hook into it for better error
|
||||
// detection.
|
||||
AddDefinition(Arguments, "FORCE_ANSI_ALLOCATOR=1");
|
||||
|
||||
Reference in New Issue
Block a user