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 DE2D4A0548; Thu, 8 Sep 2022 14:24:43 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7AC8A4021F; Thu, 8 Sep 2022 14:24:43 +0200 (CEST) Received: from mail-pf1-f178.google.com (mail-pf1-f178.google.com [209.85.210.178]) by mails.dpdk.org (Postfix) with ESMTP id A83C440143 for ; Thu, 8 Sep 2022 14:24:41 +0200 (CEST) Received: by mail-pf1-f178.google.com with SMTP id c198so7873187pfc.13 for ; Thu, 08 Sep 2022 05:24:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date; bh=CgCBgLkz9B0eGnP2vpot6XL+RmSYkWixhPJQi5XLW9s=; b=GCOzXz2k53+z1tWS7avfsU5j5SVJUv/kwqH+X2RP6ZPGUKKDHjaI8vzvq/Amf0HqbF VUkz3fnO1ZWBdXCmtP2F9jz+/kqfCRJbBtPyYJ0pj00YKqFLcYuFHMHRnkaJfEeYWlVq ug4XPPrX/6EEs7N/RU5tlL/1FkDRjo+vNmM4goykO6sypIW89E7NGxBVqTqUAMiqrSo3 R9nASHMfqJiPviiNw9iwS+Y1kzyV7w0UWzvqI743SY+VC6XdOvoEzsfO3cVCOv3PBill EL12i3NPWZ/+X5nNhltHTqJnlWOFAU9gMTgigOr6VNFca0TxqwiCRMX0ADR+RiGTUcBY 4r8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date; bh=CgCBgLkz9B0eGnP2vpot6XL+RmSYkWixhPJQi5XLW9s=; b=WtCmpnXTXQFw+qIvfhTLaofIaKkoDxuQxEQe41w+zB8rrrB+LIQywlqWLnD4eUk6rm B2vV9EUP/6SY5ivWF1MJKIHLCwvQUvvrqeqKY9EbYt418EMpzu9+9jtYUSWA6kEEHazS yN/oN5XlEc+LfjVyW3TuzLmDufLG4kQDTv0J6M7g0iw/SmI/HIKexkpL/hILUAr5T51k /U2i3CdwQGm6PHUFO2ajxXxWcPolrXfdRiNMelnPHw1sWxsTnicW70DpURG7PJF45QeY 9KBU1YlKRRb+xbNGyIRvTfrYcjecs3552abVJL3o1uPlU/6Byon7TayEGiSd9S2RoJoS XkQw== X-Gm-Message-State: ACgBeo0DbbH14k/DvXwqAD+N2SRtqTzJb6yRHi6oK3ZkspxLVFkXz//G GeeOw/j04sMkYAEX1aVolcu1eZFsU13KetjzJVok+UtEuIc= X-Google-Smtp-Source: AA6agR5T54fYIm4mrfjD/92Eits1qy5cQYofpFY+BN+vGFq6bmoEVHPHAkJdIfJ0YOjYRM1hA/JJ26FEz90aSjg79vg= X-Received: by 2002:a05:6a00:b43:b0:52f:59dc:93 with SMTP id p3-20020a056a000b4300b0052f59dc0093mr9071207pfo.26.1662639880397; Thu, 08 Sep 2022 05:24:40 -0700 (PDT) MIME-Version: 1.0 From: "bhargav M.P" Date: Thu, 8 Sep 2022 17:54:28 +0530 Message-ID: Subject: Running DPDK application with memory Sanitizer To: dev@dpdk.org Content-Type: multipart/alternative; boundary="00000000000075e7f205e8298370" 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 --00000000000075e7f205e8298370 Content-Type: text/plain; charset="UTF-8" Hi, I am trying to run a DPDK(20.11) application using memory sanitizer. I have taken the patch from upstream branch: https://github.com/DPDK/dpdk/commit/6cc51b1293ceac4a77d4bf7ac91a8bbd59e1f78c and made a build with -fsanitize=address. The gcc version is: gcc 6.3.0 . But the application doesn't abort when an invalid memory access is made. Starting the application with below: ./dpdk-app -l 2-4 -a 0000:00:05.0 -a 0000:00:06.0 -a 0000:00:07.0 -a 0000:00:08.0 --socket-mem=3072 an invalid memory access from an application does not abort. Ex: From the application doing below doesn't abort: char *p = rte_zmalloc(NULL, 9, 0); rte_free(p); *p = 'a'; Am I missing something here.? is DPDK ASAN supposed to be used only in 21.11 release onwards.? Really appreciate your help on this as we are trying debug a possible memory corruption with DPDK application and thought DPDK memory sanitizer support will be of great help Thanks for the help, Bhargav --00000000000075e7f205e8298370 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,
I am trying to run a DPDK(20.11) application using = memory sanitizer. I have taken the patch from upstream branch: =C2=A0https://github.com/DPDK/dpdk/commit/6cc51b1293ceac4a77d4bf7ac91a8bb= d59e1f78c
and made a build with -fsanitize=3Daddress. The gcc versio= n is: gcc 6.3.0 . But the application doesn't abort when an invalid mem= ory access is made.=C2=A0 Starting the application with below:

./dpd= k-app -l 2-4 -a 0000:00:05.0 -a 0000:00:06.0 -a 0000:00:07.0 -a 0000:00:08.= 0 --socket-mem=3D3072

an invalid memory access from an application d= oes not abort.

Ex:=C2=A0 From the application doing below doesn'= t abort:

char *p =3D rte_zmalloc(NULL, 9, 0);

rte_free(p);
*p =3D 'a';

Am I missing something here.?

is DPD= K ASAN supposed to be used only in 21.11 release onwards.? Really appreciat= e your help on this as we are trying debug a possible memory=C2=A0corruptio= n with DPDK application and thought=C2=A0DPDK memory sanitizer support will= be of great help

Thanks for the help,
Bhargav
--00000000000075e7f205e8298370--