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 C526345A2C; Wed, 25 Sep 2024 18:34:34 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B05DE4025D; Wed, 25 Sep 2024 18:34:34 +0200 (CEST) Received: from inbox.dpdk.org (inbox.dpdk.org [95.142.172.178]) by mails.dpdk.org (Postfix) with ESMTP id 887CE400EF for ; Wed, 25 Sep 2024 18:34:33 +0200 (CEST) Received: by inbox.dpdk.org (Postfix, from userid 33) id 7C88345A2D; Wed, 25 Sep 2024 18:34:33 +0200 (CEST) From: bugzilla@dpdk.org To: dev@dpdk.org Subject: [DPDK/cryptodev Bug 1552] free miss match in cryptodev Date: Wed, 25 Sep 2024 16:34:33 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: DPDK X-Bugzilla-Component: cryptodev X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: major X-Bugzilla-Who: stephen@networkplumber.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: dev@dpdk.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: multipart/alternative; boundary=17272820730.fdC21a47.3556082 Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://bugs.dpdk.org/ Auto-Submitted: auto-generated X-Auto-Response-Suppress: All MIME-Version: 1.0 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 --17272820730.fdC21a47.3556082 Date: Wed, 25 Sep 2024 18:34:33 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.dpdk.org/ Auto-Submitted: auto-generated X-Auto-Response-Suppress: All https://bugs.dpdk.org/show_bug.cgi?id=3D1552 Bug ID: 1552 Summary: free miss match in cryptodev Product: DPDK Version: unspecified Hardware: All OS: All Status: UNCONFIRMED Severity: major Priority: Normal Component: cryptodev Assignee: dev@dpdk.org Reporter: stephen@networkplumber.org Target Milestone: --- If GCC function attributes are added to rte_malloc, then Gcc is able to identify rte_malloc to free mismatches like: [1319/2957] Compiling C object drivers/libtmp_rte_crypto_bcmfs.a.p/crypto_bcmfs_bcmfs_device.c.o In function =E2=80=98fsdev_allocate_one_dev=E2=80=99, inlined from =E2=80=98bcmfs_vdev_probe=E2=80=99 at ../drivers/crypto/bcmfs/bcmfs_device.c:283:11: ../drivers/crypto/bcmfs/bcmfs_device.c:142:9: warning: =E2=80=98free=E2=80= =99 called on pointer returned from a mismatched allocation function [-Wmismatched-dealloc] 142 | free(fsdev); | ^~~~~~~~~~~ ../drivers/crypto/bcmfs/bcmfs_device.c:102:17: note: returned from =E2=80= =98rte_calloc=E2=80=99 102 | fsdev =3D rte_calloc(__func__, 1, sizeof(*fsdev), 0); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In function =E2=80=98fsdev_release=E2=80=99, inlined from =E2=80=98bcmfs_vdev_probe=E2=80=99 at ../drivers/crypto/bcmfs/bcmfs_device.c:308:2: ../drivers/crypto/bcmfs/bcmfs_device.c:166:9: warning: =E2=80=98free=E2=80= =99 called on pointer returned from a mismatched allocation function [-Wmismatched-dealloc] 166 | free(fsdev); | ^~~~~~~~~~~ In function =E2=80=98fsdev_allocate_one_dev=E2=80=99, inlined from =E2=80=98bcmfs_vdev_probe=E2=80=99 at ../drivers/crypto/bcmfs/bcmfs_device.c:283:11: ../drivers/crypto/bcmfs/bcmfs_device.c:102:17: note: returned from =E2=80= =98rte_calloc=E2=80=99 102 | fsdev =3D rte_calloc(__func__, 1, sizeof(*fsdev), 0); |=20=20 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --=20 You are receiving this mail because: You are the assignee for the bug.= --17272820730.fdC21a47.3556082 Date: Wed, 25 Sep 2024 18:34:33 +0200 MIME-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.dpdk.org/ Auto-Submitted: auto-generated X-Auto-Response-Suppress: All
Bug ID 1552
Summary free miss match in cryptodev
Product DPDK
Version unspecified
Hardware All
OS All
Status UNCONFIRMED
Severity major
Priority Normal
Component cryptodev
Assignee dev@dpdk.org
Reporter stephen@networkplumber.org
Target Milestone ---

If GCC function attributes are add=
ed to rte_malloc, then Gcc is able to
identify rte_malloc to free mismatches like:

[1319/2957] Compiling C object
drivers/libtmp_rte_crypto_bcmfs.a.p/crypto_bcmfs_bcmfs_device.c.o
In function =E2=80=98fsdev_allocate_one_dev=E2=80=99,
    inlined from =E2=80=98bcmfs_vdev_probe=E2=80=99 at
../drivers/crypto/bcmfs/bcmfs_device.c:283:11:
../drivers/crypto/bcmfs/bcmfs_device.c:142:9: warning: =E2=80=98free=E2=80=
=99 called on pointer
returned from a mismatched allocation function [-Wmismatched-dealloc]
  142 |         free(fsdev);
      |         ^~~~~~~~~~~
../drivers/crypto/bcmfs/bcmfs_device.c:102:17: note: returned from =E2=80=
=98rte_calloc=E2=80=99
  102 |         fsdev =3D rte_calloc(__func__, 1, sizeof(*fsdev), 0);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function =E2=80=98fsdev_release=E2=80=99,
    inlined from =E2=80=98bcmfs_vdev_probe=E2=80=99 at
../drivers/crypto/bcmfs/bcmfs_device.c:308:2:
../drivers/crypto/bcmfs/bcmfs_device.c:166:9: warning: =E2=80=98free=E2=80=
=99 called on pointer
returned from a mismatched allocation function [-Wmismatched-dealloc]
  166 |         free(fsdev);
      |         ^~~~~~~~~~~
In function =E2=80=98fsdev_allocate_one_dev=E2=80=99,
    inlined from =E2=80=98bcmfs_vdev_probe=E2=80=99 at
../drivers/crypto/bcmfs/bcmfs_device.c:283:11:
../drivers/crypto/bcmfs/bcmfs_device.c:102:17: note: returned from =E2=80=
=98rte_calloc=E2=80=99
  102 |         fsdev =3D rte_calloc(__func__, 1, sizeof(*fsdev), 0);
      |=20=20
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          


You are receiving this mail because:
  • You are the assignee for the bug.
=20=20=20=20=20=20=20=20=20=20
= --17272820730.fdC21a47.3556082--