diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/lib/perf/include/internal/rc_check.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/lib/perf/include/internal/rc_check.h b/tools/lib/perf/include/internal/rc_check.h index c0626d8beb59..d5d771ccdc7b 100644 --- a/tools/lib/perf/include/internal/rc_check.h +++ b/tools/lib/perf/include/internal/rc_check.h @@ -6,6 +6,14 @@ #include <linux/zalloc.h> /* + * Enable reference count checking implicitly with leak checking, which is + * integrated into address sanitizer. + */ +#if defined(LEAK_SANITIZER) || defined(ADDRESS_SANITIZER) +#define REFCNT_CHECKING 1 +#endif + +/* * Shared reference count checking macros. * * Reference count checking is an approach to sanitizing the use of reference |