DON’T DO THIS, FOLLOW THE INSTRUCTIONS IN MY NEXT POST BELOW INSTEAD.
We just ran into this issue for a build machine that runs multiple versions of UE, so we could not update the shared build xml - this issue has been fixed in 5.5 so we patched the old engines.
What we did was to open up:
\Unreal Engine\Engine\Source\Runtime\Core\Public\Experimental\ConcurrentLinearAllocator.h
Replaced this chunk:
#if PLATFORM_HAS_ASAN_INCLUDE
#include <sanitizer/asan_interface.h>
#if defined(__SANITIZE_ADDRESS__)
#define IS_ASAN_ENABLED 1
#elif __has_feature(address_sanitizer)
#define IS_ASAN_ENABLED 1
#else
#define IS_ASAN_ENABLED 0
#endif
#else
#define ASAN_POISON_MEMORY_REGION(addr, size) ((void)(addr), (void)(size))
#define ASAN_UNPOISON_MEMORY_REGION(addr, size) ((void)(addr), (void)(size))
#define IS_ASAN_ENABLED 0
#endif
With this from UE 5.5:
#if PLATFORM_HAS_ASAN_INCLUDE
#include <sanitizer/asan_interface.h>
#if defined(__SANITIZE_ADDRESS__)
#define IS_ASAN_ENABLED 1
#elif defined(__has_feature)
#if __has_feature(address_sanitizer)
#define IS_ASAN_ENABLED 1
#else
#define IS_ASAN_ENABLED 0
#endif
#else
#define IS_ASAN_ENABLED 0
#endif
#else
#define ASAN_POISON_MEMORY_REGION(addr, size) ((void)(addr), (void)(size))
#define ASAN_UNPOISON_MEMORY_REGION(addr, size) ((void)(addr), (void)(size))
#define IS_ASAN_ENABLED 0
#endif
The key difference is that it checks defined(__has_feature)