diff options
author | Ian Rogers <[email protected]> | 2023-04-20 10:18:12 -0700 |
---|---|---|
committer | Arnaldo Carvalho de Melo <[email protected]> | 2023-04-20 15:12:02 -0300 |
commit | 9be6ab181b7b8d6114e225ae3c7c01bb6380cf8a (patch) | |
tree | 1fa5c9879925d1aa485aa71a7960983040170926 | |
parent | edd4cab2d492daa5e45bd45e44084a2b9880f224 (diff) |
libperf rc_check: Enable implicitly with sanitizers
If using leak sanitizer then implicitly enable reference count checking.
Signed-off-by: Ian Rogers <[email protected]>
Cc: Adrian Hunter <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
-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 |