Fix(tool): asan compiler failed

Issue: #I6TFY2
Change-Id: I8951ebdca3fc71d0e4cb6d860cf9adb8fe8e5b38
Signed-off-by: yingguofeng@huawei.com <yingguofeng@huawei.com>
This commit is contained in:
yingguofeng@huawei.com 2023-04-06 20:02:48 +08:00
parent 780d9eb10a
commit e7fcacefd6

View File

@ -33,13 +33,23 @@ void __asan_unpoison_memory_region(void const volatile *addr, size_t size) __att
}
// NOLINTNEXTLINE(cppcoreguidelines-macro-usage)
#ifndef ASAN_POISON_MEMORY_REGION
#define ASAN_POISON_MEMORY_REGION(addr, size) __asan_poison_memory_region((addr), (size))
#endif
// NOLINTNEXTLINE(cppcoreguidelines-macro-usage)
#ifndef ASAN_UNPOISON_MEMORY_REGION
#define ASAN_UNPOISON_MEMORY_REGION(addr, size) __asan_unpoison_memory_region((addr), (size))
#endif
#else
// NOLINTNEXTLINE(cppcoreguidelines-macro-usage)
#ifdef ASAN_POISON_MEMORY_REGION
#undef ASAN_POISON_MEMORY_REGION
#endif
#define ASAN_POISON_MEMORY_REGION(addr, size) ((void)(addr), (void)(size))
// NOLINTNEXTLINE(cppcoreguidelines-macro-usage)
#ifdef ASAN_UNPOISON_MEMORY_REGION
#undef ASAN_UNPOISON_MEMORY_REGION
#endif
#define ASAN_UNPOISON_MEMORY_REGION(addr, size) ((void)(addr), (void)(size))
#endif