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 B998845C7D; Tue, 5 Nov 2024 09:19:41 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4C1F34025D; Tue, 5 Nov 2024 09:19:41 +0100 (CET) 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 7CCDD400EF for ; Tue, 5 Nov 2024 09:19:40 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1730794779; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OsUhc9WkQw7GXH57ashIqTSnXhQ+yLQE1pzjqGJYflc=; b=gMnWuCDUerV8n01EdnZHd4QrcUaTsIP1LvkPiCXJrpKEdM01rQ3VXzSsrzqEs95N2ywcfh DVfiuVz0Eo9feSjBpaq1njxYnrnBwX2iCG7taSmn8J+rpjx0swN6GqRcwsWosgK9lx4X2A 7ABxlzEQTRbiUW607nDNC48rHlaNu3k= Received: from mail-lj1-f198.google.com (mail-lj1-f198.google.com [209.85.208.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-668-Y77GFGShPRKU2GY3c0-XDQ-1; Tue, 05 Nov 2024 03:19:38 -0500 X-MC-Unique: Y77GFGShPRKU2GY3c0-XDQ-1 Received: by mail-lj1-f198.google.com with SMTP id 38308e7fff4ca-2fb3f99c9a7so29270351fa.1 for ; Tue, 05 Nov 2024 00:19:38 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730794777; x=1731399577; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=OsUhc9WkQw7GXH57ashIqTSnXhQ+yLQE1pzjqGJYflc=; b=MkZBbdow5wYv11fmmIg4lLLdg4itDb+CSmn9fbYnFU21ddDc6moDPXV0aX5yyKPoPm lKdmqsr1oPjaEuLXkblcbGnwWQlvr92Tl0EVjxq9DwhexY4cCQM15gWZ/+UeqM6/FeP1 ZLd21lUBKb9WFWxfX2TgFfEHSoC70r+/ai/YhNdIS3CuaZgUwjd+aF1CWnu/6e+UTt71 ewyquM0BHOofkuGutu0MMUvQNzW/DpHuD6cd0stRJAw25cVudd9UBJaF5ualbAtFwD+j gSZNN8xUxtfa73h27CowHvBfeYWBGZJdOtxRC9w1J3L81t8KiTYEL96G5w6z7cwUG5kq r+4Q== X-Forwarded-Encrypted: i=1; AJvYcCVlKZckUYnK15iBKpFBAJfXZSu8rj5gC2uN7FJxck8YWKRkgP/EVuQVZdJcBLDlTjpbKTM=@dpdk.org X-Gm-Message-State: AOJu0YyifJvX8VxrLYLS0L7rWFzenvRi0LaFqDR0QCIRvINkRoIKdlec PwPQtAmn1s9cz8HYk22n27qFGeusCfaVW6rgeuJ7j9wrCH4tOlxoU43oCYK4DDQUvdOzKTUBmuM 3uOG1QJUreUwFSeV9QsJbHHroiElZTIak3cmnOPAwxhkiH94D3vsp3jV7br04MfrDYcwXwcIpPp CujORaqd1HnpI42Js= X-Received: by 2002:a2e:701:0:b0:2f7:7ef7:7434 with SMTP id 38308e7fff4ca-2fcbe095e65mr145954141fa.37.1730794777028; Tue, 05 Nov 2024 00:19:37 -0800 (PST) X-Google-Smtp-Source: AGHT+IFI6ing5Ovk7gK3PVvcgb+hKRIUK5pM0EC/qySF/XRgbSdMbFZAfIwdsiYTNGHvv3B+OaimUGtN/Pw5V6g0Jg8= X-Received: by 2002:a2e:701:0:b0:2f7:7ef7:7434 with SMTP id 38308e7fff4ca-2fcbe095e65mr145953891fa.37.1730794776613; Tue, 05 Nov 2024 00:19:36 -0800 (PST) MIME-Version: 1.0 References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1730776553-31277-1-git-send-email-andremue@linux.microsoft.com> <1730776553-31277-3-git-send-email-andremue@linux.microsoft.com> In-Reply-To: <1730776553-31277-3-git-send-email-andremue@linux.microsoft.com> From: David Marchand Date: Tue, 5 Nov 2024 09:19:25 +0100 Message-ID: Subject: Re: [PATCH v4 02/19] eal/linux: remove use of VLAs To: Andre Muezerie Cc: stephen@networkplumber.org, aman.deep.singh@intel.com, anatoly.burakov@intel.com, andrew.rybchenko@oktetlabs.ru, bruce.richardson@intel.com, dev@dpdk.org, dmitry.kozliuk@gmail.com, dsosnowski@nvidia.com, fanzhang.oss@gmail.com, fengchengwen@huawei.com, ferruh.yigit@amd.com, gakhil@marvell.com, harry.van.haaren@intel.com, hkalra@marvell.com, honnappa.nagarahalli@arm.com, hujiayu.hu@foxmail.com, jingjing.wu@intel.com, kevin.laatz@intel.com, konstantin.v.ananyev@yandex.ru, matan@nvidia.com, mb@smartsharesystems.com, orika@nvidia.com, pallavi.kadam@intel.com, reshma.pattan@intel.com, roretzla@linux.microsoft.com, sameh.gobriel@intel.com, suanmingm@nvidia.com, thomas@monjalon.net, vfialko@marvell.com, viacheslavo@nvidia.com, vladimir.medvedkin@intel.com, yipeng1.wang@intel.com, Konstantin Ananyev X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 Hello Andre, Thanks for taking over this series. On Tue, Nov 5, 2024 at 4:18=E2=80=AFAM Andre Muezerie wrote: > > From: Konstantin Ananyev > > 1) ./lib/eal/linux/eal_interrupts.c:1073:16 > : warning: ISO C90 forbids variable length array =E2=80=98events=E2= =80=99 > > eal_intr_handle_interrupts() is called by eal_intr_thread_main() > so it seems ok to simply alloc space for events from heap and reuse the > same buffer through the life of the thread. ASan reports this allocation as a leak because nothing releases it when terminating the interrupt thread. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D83289=3D=3DERROR: LeakSanitizer: detected memory leaks Direct leak of 12300 byte(s) in 1 object(s) allocated from: #0 0x55903c9a54b6 in __interceptor_realloc (/home/runner/work/dpdk/dpdk/build/app/dpdk-test+0x2744b6) (BuildId: e8a4f6c67f5c6afc20efb5f168c0df885d4c6493) #1 0x7f0011ee8873 in eal_intr_thread_main /home/runner/work/dpdk/dpdk/build/../lib/eal/linux/eal_interrupts.c:1174:8 #2 0x7f0010694ac2 in start_thread nptl/./nptl/pthread_create.c:442:8 SUMMARY: AddressSanitizer: 12300 byte(s) leaked in 1 allocation(s). ---------------------------------------------------------------------------= --- It will need some rework. --=20 David Marchand