From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3E37CA0C45; Mon, 13 Sep 2021 17:06:05 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B0C6F40151; Mon, 13 Sep 2021 17:06:04 +0200 (CEST) Received: from mail-pg1-f172.google.com (mail-pg1-f172.google.com [209.85.215.172]) by mails.dpdk.org (Postfix) with ESMTP id 098B24014F for ; Mon, 13 Sep 2021 17:06:02 +0200 (CEST) Received: by mail-pg1-f172.google.com with SMTP id 17so9725175pgp.4 for ; Mon, 13 Sep 2021 08:06:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=agBSULaC6sMsd4y813HJM5CzQVhqsuUx+sSIAjfglJM=; b=QkkwOmcAOvxKAMg6o2R2iBtuFiHnGDFTwi14uOTOTeUrP51VY/3kQpZYWB3Hrvub9a +38xf3A1yvdaIscUyoWp67oIHadXbVE/TddSeo+CutviGAJOd5y0SAxEn2GnApzU55FY 9RV4p9kABI0uYwHRPmk2vkOr7NHFcP2H9RS6w5vokz+Mk64dttfRTU1MEPEVFISa8PdQ j7FPvabA0c12bQxBKDaZ3DN4QvvzU/ZyqrmUf1zcay/XZPRk2EJDP4VLZ/g+5LhoX/HO M8Al/k8fV4OoJ5bdttBaVALpFkV2oSxyu8M2vMP9QvaIW97yYSUE398PaN9a9yA3HwQI 5Esw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=agBSULaC6sMsd4y813HJM5CzQVhqsuUx+sSIAjfglJM=; b=wjA8SqEM1lYvblHTK1KmPTidfUakOigkk05GtBo80GyiljjkPLZ2K0P6ZOda+fZutv 1Xviz/+e0ROLVapP6xK8v3Znr21XBuLYJCP3JL4ef7NUhgQPWJG3n0F4xeEZ/Tf7D1rh ykn1ddbnNvmntSUOXe67hgJEQF35jGmpQmK2l2m8X0cYb4U/PTJUC81XXG/N6YvFm1x8 FB4z1VOlUk7NoKy6FWGkQmKQbMIn4VZgOF/WK1a2UIMwZjs7bDt4W6V6RIS1V6vb+93t y+N3tFC4M0Dg5pgg7oGMVeixqix78N6kRx2AQVOZ0rJSr92WDY4kt5Ch7gL1J77u7gWz L0mQ== X-Gm-Message-State: AOAM531V95OELENXVNZiXEs2nfJHGusByLP40pWoDKnhZV9M++jpW7Wd aghTqQD0AxlTQDkAeOJJWug47A== X-Google-Smtp-Source: ABdhPJyF8i2w8zB+ThMt3L1yDe4Nonh86tbVyEMb7uP3Gnv//Hyuhe8BnfcKtI4ZwPA3DBMh0f35Kw== X-Received: by 2002:a62:b610:0:b0:3ff:c3ae:439c with SMTP id j16-20020a62b610000000b003ffc3ae439cmr11493291pff.53.1631545561622; Mon, 13 Sep 2021 08:06:01 -0700 (PDT) Received: from hermes.local (204-195-33-123.wavecable.com. [204.195.33.123]) by smtp.gmail.com with ESMTPSA id z12sm7094569pfe.79.2021.09.13.08.06.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Sep 2021 08:06:01 -0700 (PDT) Date: Mon, 13 Sep 2021 08:05:58 -0700 From: Stephen Hemminger To: "Peng, ZhihongX" Cc: "Burakov, Anatoly" , "Ananyev, Konstantin" , "dev@dpdk.org" , "Lin, Xueqin" Message-ID: <20210913080558.4a8b9ae4@hermes.local> In-Reply-To: References: <20210910020147.148019-1-zhihongx.peng@intel.com> <20210909194756.6addfe73@hermes.local> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] Enable AddressSanitizer feature on DPDK X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Mon, 13 Sep 2021 05:27:12 +0000 "Peng, ZhihongX" wrote: > > -----Original Message----- > > From: Stephen Hemminger > > Sent: Friday, September 10, 2021 10:48 AM > > To: Peng, ZhihongX > > Cc: Burakov, Anatoly ; Ananyev, Konstantin > > ; dev@dpdk.org; Lin, Xueqin > > > > Subject: Re: [PATCH] Enable AddressSanitizer feature on DPDK > > > > On Fri, 10 Sep 2021 02:01:47 +0000 > > zhihongx.peng@intel.com wrote: > > > > > > > > +if get_option('b_sanitize').startswith('address') > > > + cflags += '-DRTE_MALLOC_ASAN' > > > +endif > > > + > > > > This looks great, but can we make it just do-the-right-thing and get rid of the > > nerd knobs (i.e no meson configure). > > > > The address sanitizer already has a way to detect if enabled. > > > > GCC uses: > > __SANITIZE_ADDRESS__ > > > > Clang uses: > > #if defined(__has_feature) > > # if __has_feature(address_sanitizer) > > Tried this method you said. It can run successfully. Because gcc and clang have different > Methods for determining whether to turn on the asan function, so if you judge the two > methods in the code, it feels not simple to judge in meson. There is already compiler specific #ifdef's why not do this contained in one header file? The point is DPDK is trying to get away from having configuration settings if at all possible. Configuration creates dependency nightmares and also leaves many code paths as never tested.