libperf rc_check: Enable implicitly with sanitizers
If using leak sanitizer then implicitly enable reference count checking. Signed-off-by: Ian Rogers <irogers@google.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://lore.kernel.org/r/20230420171812.561603-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
edd4cab2d4
commit
9be6ab181b
1 changed files with 8 additions and 0 deletions
|
@ -5,6 +5,14 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <linux/zalloc.h>
|
#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.
|
* Shared reference count checking macros.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Add table
Reference in a new issue