AK: Toolchain dependend instrumentation __attribute__

GCC sometimes complains about the The `no_sanitize("address")` syntax,
and clang sometimes complains abouth the `no_sanitize_address` syntax.
Both claim to support both, so that's neat!
This commit is contained in:
Space Meyer 2024-04-10 22:11:31 +02:00 committed by Andrew Kaster
parent 8050ef24a6
commit 7d8431dcfc
Notes: sideshowbarker 2024-07-16 23:08:48 +09:00

View file

@ -189,7 +189,11 @@
#ifdef NO_SANITIZE_ADDRESS
# undef NO_SANITIZE_ADDRESS
#endif
#define NO_SANITIZE_ADDRESS __attribute__((no_sanitize_address))
#if defined(AK_COMPILER_CLANG)
# define NO_SANITIZE_ADDRESS __attribute__((no_sanitize("address")))
#else
# define NO_SANITIZE_ADDRESS __attribute__((no_sanitize_address))
#endif
#ifdef NAKED
# undef NAKED