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 06BF3A034F; Fri, 8 Oct 2021 10:30:28 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8F3A14067E; Fri, 8 Oct 2021 10:30:27 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 8C9A84067B for ; Fri, 8 Oct 2021 10:30:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1633681826; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=gp0fEctI/R7TGQqRCQk0hRDUmeeyG26PbOmBVhU21fY=; b=XbZcd6QTz6AvhVpAiEAcRAmQ7kt6moUiXH6cF3rfjwJyxTBCBMZ+K2yRkuyH3gqX4aSM40 kRlL+EHKO3nbMk9No/P0Qhe8NRnf9Gov0C1D7tuRJpYFxvxq3MKTaz4Qu47CvAbns6UpQq O1dZu/MmNITD/m9v9Gtc6lSlNUTexP8= Received: from mail-lf1-f72.google.com (mail-lf1-f72.google.com [209.85.167.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-472-GtYXHWrHO4G-ibORH-1Dxg-1; Fri, 08 Oct 2021 04:30:18 -0400 X-MC-Unique: GtYXHWrHO4G-ibORH-1Dxg-1 Received: by mail-lf1-f72.google.com with SMTP id i40-20020a0565123e2800b003f53da59009so6540997lfv.16 for ; Fri, 08 Oct 2021 01:30:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=gp0fEctI/R7TGQqRCQk0hRDUmeeyG26PbOmBVhU21fY=; b=EdVKmny9CbJ8ImOL5puVy1Y1rR/a3+aqHX0r4cABSFI3/d+jXyZboqyMXjDxUcZOGt JzdV6uAzqFe8vPGrxZjFjXXiX4nsbIvKhzmfPjJbmOIqwld7F0hrTao2PaUhWFxU5g9T ABsPyHemG8lSq00sgbQRBRIkkeEcNHSpqZ02CdUFPHfsSmqdg/1UmZNHauyUFIzo/5yh K30sItURBcUB6weuTpisqPX3IYd1wksxHllN9i0EbjwSj54P8boLqKOvGSpa0jCs3VEi PZ19b1cKJthN8MudlbpPj4/wb2JBvggwPmu3yGhMiQbEjsErqM58x2ua31GRbNpGhLOA CDKA== X-Gm-Message-State: AOAM532ltLDntWkrf9JrLMLRBtC1yi1RrQOdjD4oVmSIECH8azSA0dK9 3fnR4zxOM8xpWx7NoQ7cH/VhOcXJWDgbBsDMuKURX4VHw0PGTIqCZ3p3671JZDFawZ8fTmRayIh I+NB4zXnX12PjY3BWSyE= X-Received: by 2002:a2e:a54d:: with SMTP id e13mr1977455ljn.159.1633681817326; Fri, 08 Oct 2021 01:30:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw/3scvU8W8cB2JbSEk7OBkgM1sH75qvvkE+0TsJG8paiYBpEfb835UnEToQIT3URggNUUyVmxkhCJ7uo/gOFc= X-Received: by 2002:a2e:a54d:: with SMTP id e13mr1977435ljn.159.1633681817153; Fri, 08 Oct 2021 01:30:17 -0700 (PDT) MIME-Version: 1.0 References: <20210924100310.4278-1-zhihongx.peng@intel.com> <20210930052724.195414-1-zhihongx.peng@intel.com> In-Reply-To: From: David Marchand Date: Fri, 8 Oct 2021 10:30:05 +0200 Message-ID: To: "Peng, ZhihongX" , "Richardson, Bruce" Cc: "Burakov, Anatoly" , "Ananyev, Konstantin" , Stephen Hemminger , dev , "Lin, Xueqin" , Thomas Monjalon Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH v6 1/2] Enable ASan for memory detector 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 Fri, Oct 8, 2021 at 10:07 AM Peng, ZhihongX wrote: > > > -----Original Message----- > > From: David Marchand > > Sent: Thursday, September 30, 2021 4:20 PM > > To: Peng, ZhihongX ; Richardson, Bruce > > > > Cc: Burakov, Anatoly ; Ananyev, Konstantin > > ; Stephen Hemminger > > ; dev ; Lin, Xueqin > > ; Thomas Monjalon > > Subject: Re: [dpdk-dev] [PATCH v6 1/2] Enable ASan for memory detector on > > DPDK > > > > Hello, > > > > I see v6 is superseded in pw, I have been cleaning my queue... maybe my > > fault. > > [snip] > > > V7 version will be modified. Ok, let's forget about *v6 bis* and go with v7... > > > Something like (only quickly tested): > > > > diff --git a/config/meson.build b/config/meson.build index > > 4cdf589e20..7d8b71da79 100644 > > --- a/config/meson.build > > +++ b/config/meson.build > > @@ -411,6 +411,33 @@ if get_option('b_lto') > > endif > > endif > > > > +if get_option('b_sanitize') == 'address' > > + asan_dep = cc.find_library('asan', required: true) > > + if (not cc.links('int main(int argc, char *argv[]) { return 0; }', > > + dependencies: asan_dep)) > > + error('broken dependency, "libasan"') > > + endif > > + add_project_link_arguments('-lasan', language: 'c') > > + dpdk_extra_ldflags += '-lasan' > > +endif > > + > > if get_option('default_library') == 'both' > > error( ''' > > Unsupported value "both" for "default_library" option. > > > > > > Bruce, do you see an issue with this approach? > > It seems clearer to get the ASan switch in the c code. This is a feature the developper asked for at configuration time. We have other condition to fulfill to get ASan linking correctly (wrt lundef workaround and presence of libasan on Centos/RHEL 7). It's not a matter of being clearer (which I fail to see how it is), it's a matter of putting the check at the right place. -- David Marchand