aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/func_attr.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/func_attr.h')
-rw-r--r--src/nvim/func_attr.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/nvim/func_attr.h b/src/nvim/func_attr.h
index 6c049df6ff..4b434f6771 100644
--- a/src/nvim/func_attr.h
+++ b/src/nvim/func_attr.h
@@ -99,6 +99,10 @@
# undef FUNC_ATTR_NO_SANITIZE_UNDEFINED
#endif
+#ifdef FUNC_ATTR_NO_SANITIZE_ADDRESS
+# undef FUNC_ATTR_NO_SANITIZE_ADDRESS
+#endif
+
#ifdef FUNC_ATTR_PRINTF
# undef FUNC_ATTR_PRINTF
#endif
@@ -139,6 +143,11 @@
# define REAL_FATTR_NO_SANITIZE_UNDEFINED \
__attribute__((no_sanitize("undefined")))
# endif
+
+# if NVIM_HAS_ATTRIBUTE(no_sanitize_address)
+# define REAL_FATTR_NO_SANITIZE_ADDRESS \
+ __attribute__((no_sanitize_address))
+# endif
# endif
// Define attributes that are not defined for this compiler.
@@ -199,6 +208,10 @@
# define REAL_FATTR_NO_SANITIZE_UNDEFINED
# endif
+# ifndef REAL_FATTR_NO_SANITIZE_ADDRESS
+# define REAL_FATTR_NO_SANITIZE_ADDRESS
+# endif
+
# ifndef REAL_FATTR_PRINTF
# define REAL_FATTR_PRINTF(x, y)
# endif
@@ -233,6 +246,7 @@
# define FUNC_ATTR_NONNULL_RET REAL_FATTR_NONNULL_RET
# define FUNC_ATTR_NORETURN REAL_FATTR_NORETURN
# define FUNC_ATTR_NO_SANITIZE_UNDEFINED REAL_FATTR_NO_SANITIZE_UNDEFINED
+# define FUNC_ATTR_NO_SANITIZE_ADDRESS REAL_FATTR_NO_SANITIZE_ADDRESS
# define FUNC_ATTR_PRINTF(x, y) REAL_FATTR_PRINTF(x, y)
#elif !defined(DO_NOT_DEFINE_EMPTY_ATTRIBUTES)
# define FUNC_ATTR_MALLOC
@@ -249,5 +263,6 @@
# define FUNC_ATTR_NONNULL_RET
# define FUNC_ATTR_NORETURN
# define FUNC_ATTR_NO_SANITIZE_UNDEFINED
+# define FUNC_ATTR_NO_SANITIZE_ADDRESS
# define FUNC_ATTR_PRINTF(x, y)
#endif