From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5CED7C77B7A for ; Thu, 20 Apr 2023 18:12:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230331AbjDTSM6 (ORCPT ); Thu, 20 Apr 2023 14:12:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33250 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229577AbjDTSM6 (ORCPT ); Thu, 20 Apr 2023 14:12:58 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0DF1E3A90; Thu, 20 Apr 2023 11:12:57 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9D9C264B1A; Thu, 20 Apr 2023 18:12:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D1E57C433EF; Thu, 20 Apr 2023 18:12:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1682014376; bh=kSvkn/SMAUuZevGgkbpWRmpLNf69JWrO4HhG5l/4Agk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=iahBDf7ycPKPY4r29MIYUpHmLKJ1iqx/zYUO/mIDTMbXuScnzk5Z6b4aFpzUA662a +mDeAIIx2q3lcV0EDdZybGO0Shy83bIu98ETLr0BZBSs96A5vgrfvpqXgxVfiy7tBU WxqTsvmXj/psTjENshC0xfrIhC+O6OnRMOCNvDwAK0EeRnztYs0Wjp7C3o6LsTpeu8 /1gSRmRbJ1382oXGbxbeANDMzZhFgn4wvfmgQmJkadgH42iS6fP5ofccByaLBscELx mVEjhXfsLNrr1cNgOndb+7WealwP85YQjQkuqBuYNl1daC4p2VytwScD5FRj9F9doC o9kwsM8ahdT6g== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 1378D403B5; Thu, 20 Apr 2023 15:12:53 -0300 (-03) Date: Thu, 20 Apr 2023 15:12:52 -0300 From: Arnaldo Carvalho de Melo To: Ian Rogers Cc: Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Adrian Hunter , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1] libperf rc_check: Enable implicitly with sanitizers Message-ID: References: <20230420171812.561603-1-irogers@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230420171812.561603-1-irogers@google.com> X-Url: http://acmel.wordpress.com Precedence: bulk List-ID: X-Mailing-List: linux-perf-users@vger.kernel.org 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 > --- > 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 > #include > > +/* > + * 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