* [PATCH v1] libperf rc_check: Enable implicitly with sanitizers
@ 2023-04-20 17:18 Ian Rogers
2023-04-20 18:12 ` Arnaldo Carvalho de Melo
0 siblings, 1 reply; 2+ messages in thread
From: Ian Rogers @ 2023-04-20 17:18 UTC (permalink / raw)
To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
Mark Rutland, Alexander Shishkin, Jiri Olsa, Namhyung Kim,
Ian Rogers, Adrian Hunter, linux-perf-users, linux-kernel
If using leak sanitizer then implicitly enable reference count
checking.
Signed-off-by: Ian Rogers <irogers@google.com>
---
tools/lib/perf/include/internal/rc_check.h | 8 ++++++++
1 file changed, 8 insertions(+)
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
@@ -5,6 +5,14 @@
#include <stdlib.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.
*
--
2.40.0.634.g4ca3ef3211-goog
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v1] libperf rc_check: Enable implicitly with sanitizers
2023-04-20 17:18 [PATCH v1] libperf rc_check: Enable implicitly with sanitizers Ian Rogers
@ 2023-04-20 18:12 ` Arnaldo Carvalho de Melo
0 siblings, 0 replies; 2+ messages in thread
From: Arnaldo Carvalho de Melo @ 2023-04-20 18:12 UTC (permalink / raw)
To: Ian Rogers
Cc: Peter Zijlstra, Ingo Molnar, Mark Rutland, Alexander Shishkin,
Jiri Olsa, Namhyung Kim, Adrian Hunter, linux-perf-users,
linux-kernel
Em Thu, Apr 20, 2023 at 10:18:12AM -0700, Ian Rogers escreveu:
> If using leak sanitizer then implicitly enable reference count
> checking.
Thanks, applied.
- Arnaldo
> Signed-off-by: Ian Rogers <irogers@google.com>
> ---
> tools/lib/perf/include/internal/rc_check.h | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> 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
> @@ -5,6 +5,14 @@
> #include <stdlib.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.
> *
> --
> 2.40.0.634.g4ca3ef3211-goog
>
--
- Arnaldo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-04-20 18:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-20 17:18 [PATCH v1] libperf rc_check: Enable implicitly with sanitizers Ian Rogers
2023-04-20 18:12 ` Arnaldo Carvalho de Melo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).