From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id E384DA04B5; Fri, 2 Oct 2020 13:50:50 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 339A01D582; Fri, 2 Oct 2020 13:50:49 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by dpdk.org (Postfix) with ESMTP id 108541D52E for ; Fri, 2 Oct 2020 13:50:46 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1601639445; 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=eTITbTeOa/c56wUJTeMKUeRlEo7f2hRC1eXUtmqZd5Y=; b=PHBTQwDOjFiYEtk8baiukO6vYnR7b3s5v3mxVGB19cLkzP1BEecxtqLiMH4LArb1+Ug+SK rPTHUvDlDk5i+zVuDJo7/VCrwzkCSq8th8kCO5buCkm4o0YCQbZkKRggDQ5Ji3x1zbwRIy VztaQY5QEk44opjAUfPymS6MazrV8X0= Received: from mail-ua1-f70.google.com (mail-ua1-f70.google.com [209.85.222.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-453-MTW8OBRPOnOIp24kFU4ihw-1; Fri, 02 Oct 2020 07:50:43 -0400 X-MC-Unique: MTW8OBRPOnOIp24kFU4ihw-1 Received: by mail-ua1-f70.google.com with SMTP id b1so471031uad.11 for ; Fri, 02 Oct 2020 04:50:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=eTITbTeOa/c56wUJTeMKUeRlEo7f2hRC1eXUtmqZd5Y=; b=gMAS32kHgbGnAbojpwNSIwHhcvYNdNonpCSMFH2C0GN66tKAaUfjfPnnpL17Z91S71 aLpdL1pB9Hup4U0mx2kcI1tIYCjSpjtW/QTQZYAqrSSLMv7TSmf51Rm3iNVSfa7kDUgM xX4LcyFQijHoPB6db926uA6zz3UDWGMaJCjVI5ce+h8cltA4bSzsWYbdLtW23OrXIy1q QKb7JKHZBlGJjHjSkvRR+zKabl2TtSkUD01qwFc78tipJzWK60nnQqL2iXh2ws/IzwQz fIUg3H+52z3/+SdeqEoj2s1nW7L0yDtfFHcsEZFY2H535vGwAQgSIg6f1ciYuabh5Vsi VO7Q== X-Gm-Message-State: AOAM533BiqqyOm1Wv44VVONpVsivnqFb1bXobnnMdgyRY5mOTtJaXX43 gbfTf7WWjAfc92YKm4veMNHHl54se1WVvjasn9iTOCwW1OPAUjAMrSOuAg8BRijqHSHpgNSp59z ObPT/qANnxVwR1JqmMOw= X-Received: by 2002:a05:6102:3029:: with SMTP id v9mr809207vsa.5.1601639443283; Fri, 02 Oct 2020 04:50:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwGVvTflipF061SARDwCDH7W2phsWj/tcRxA/7AQaj8MCd0fNBpwhnZTeTeBNJNIqHTab2GuqDzMsRS65HSUF0= X-Received: by 2002:a05:6102:3029:: with SMTP id v9mr809199vsa.5.1601639443029; Fri, 02 Oct 2020 04:50:43 -0700 (PDT) MIME-Version: 1.0 References: <20201002082831.5352-1-david.marchand@redhat.com> In-Reply-To: From: David Marchand Date: Fri, 2 Oct 2020 13:50:32 +0200 Message-ID: To: David Marchand Cc: "dev@dpdk.org" , "Dumitrescu, Cristian" 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" Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-dev] [PATCH] pipeline: fix build with glibc < 2.26 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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 2, 2020 at 12:38 PM Dumitrescu, Cristian wrote: > > -----Original Message----- > > From: David Marchand > > Sent: Friday, October 2, 2020 9:29 AM > > To: dev@dpdk.org > > Cc: Dumitrescu, Cristian > > Subject: [PATCH] pipeline: fix build with glibc < 2.26 > > > > reallocarray has been introduced in glibc 2.26 but we still support > > glibc >=3D 2.7. > > Simply replace with realloc, as the considered sizes are unlikely to > > overflow. > > > > """ > > The reallocarray() function changes the size of the memory block > > pointed to by ptr to be large enough for an array of nmemb elements, > > each of which is size bytes. It is equivalent to the call > > > > realloc(ptr, nmemb * size); > > > > However, unlike that realloc() call, reallocarray() fails safely in > > the case where the multiplication would overflow. If such an over=E2= =80=90 > > flow occurs, reallocarray() returns NULL, sets errno to ENOMEM, and > > leaves the original block of memory unchanged. > > """ > > > > Fixes: 3ca60ceed79a ("pipeline: add SWX pipeline specification file") > > > > Signed-off-by: David Marchand > Acked-by: Cristian Dumitrescu Applied. --=20 David Marchand