From patchwork Thu Sep 9 16:56:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dodji Seketeli X-Patchwork-Id: 44917 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9F654384A88A for ; Thu, 9 Sep 2021 16:57:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9F654384A88A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1631206641; bh=icGaUMyREntfN3SVelzLpb+eeMjVXps2ewxxSUSD63Q=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Help: List-Subscribe:From:Reply-To:From; b=wWiyvqOPi6KOvJjk3o/WK9SMAR31Wwgjm81gTpEVQubrxwddZHH/c5TO+ITnXNXmz g9VTPlW46i3lG0aYjtYB/PLlB7j/u19QrICAW9jMjlmAAbLIerhMH3GlCg9BT7Gwr+ kmIOSyYErCPQwuYxF2b45BqjCNGFOUJ4mNgCqHC4= X-Original-To: libabigail@sourceware.org Delivered-To: libabigail@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTP id 11ACD384B0D2 for ; Thu, 9 Sep 2021 16:56:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 11ACD384B0D2 Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-51-UolEHb91PpCx4JCfWhvTbg-1; Thu, 09 Sep 2021 12:56:21 -0400 X-MC-Unique: UolEHb91PpCx4JCfWhvTbg-1 Received: by mail-wr1-f71.google.com with SMTP id p10-20020a5d68ca000000b001552bf8b9daso723248wrw.22 for ; Thu, 09 Sep 2021 09:56:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:organization:date:message-id :user-agent:mime-version; bh=icGaUMyREntfN3SVelzLpb+eeMjVXps2ewxxSUSD63Q=; b=0fBUsj31aXo56TSgZw89GM8YwYMLCRYU92VvFZfQIiBJ5lvfa71mEpzR0liDZosNtI l2LObuC2gaB1K+1DFWgs8VfyTmmNsk5ykKn6TOHsUXEq1+xEyV2ktsniApblv7zahjUn Ve7KU3E97gI1hwI3jYjAWRBeMn3yuD8Jl6Jh1cBvkswy05yrCtTWK6lQW0VrgyhziB4H DOLrCQ5feIcnTByj/4IUdKG4yQQGRj9UxUOW2x/YRRxIrSA2bcLrhZGljwzkDJzc+Pty HRPkaVlEN5MUHbDjzXWix6Avn2z49nSzMAR98i+Ep658YfKHqMM2j6FfPaNuzzUQ9Mje pEtQ== X-Gm-Message-State: AOAM533sL/P7QnfGot3EIzQvyb6XvoCsnxxHcXEBNqww6tJff697wdTT PY7tfzz4y5oZfrdZrk/G3vzRxSJjLhYeKB6oiYr0W0wGEd5DNOvQbdPqNqc0H/gINwIi3lzwkeC mOuRzCJueRhfB+wB1ArIx+s6NyHe3lOJYT8W/8pr4f5LiDOE5KfIQgkcZmv/HAx6Cmuyq X-Received: by 2002:a05:600c:5112:: with SMTP id o18mr4174316wms.12.1631206579784; Thu, 09 Sep 2021 09:56:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy4L+unNMhvg7JTaVsaOSSNk0ZAHvK0Las4hPAhfODEt0oap9Kmcab8rSPfBP+l5z/18x2Fog== X-Received: by 2002:a05:600c:5112:: with SMTP id o18mr4174289wms.12.1631206579463; Thu, 09 Sep 2021 09:56:19 -0700 (PDT) Received: from localhost ([88.120.130.27]) by smtp.gmail.com with ESMTPSA id n10sm1266222wrm.92.2021.09.09.09.56.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Sep 2021 09:56:18 -0700 (PDT) Received: by localhost (Postfix, from userid 1000) id 40FFB5800FB; Thu, 9 Sep 2021 18:56:18 +0200 (CEST) To: libabigail@sourceware.org Subject: [PATCH, applied] RHBZ1944102 - self comparing ABI of protobuf-3.14.0-2.el9 failed Organization: Red Hat / France X-Operating-System: Fedora 36 X-URL: http://www.redhat.com Date: Thu, 09 Sep 2021 18:56:18 +0200 Message-ID: <87tuitelhp.fsf@redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-12.2 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libabigail@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list of the Libabigail project List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-Patchwork-Original-From: Dodji Seketeli via Libabigail From: Dodji Seketeli Reply-To: Dodji Seketeli Errors-To: libabigail-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libabigail" Hello, Reading size and alignment from abixml can lead to loss of precision that surfaced when self comparing the protobuf package as described in bug https://bugzilla.redhat.com/show_bug.cgi?id=1944102. Fixed thus. * src/abg-reader.cc (read_size_and_alignment): Use atoll to read long long values, not atoi. Signed-off-by: Dodji Seketeli Applied to master. --- src/abg-reader.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/abg-reader.cc b/src/abg-reader.cc index 2331815e..7ee95c70 100644 --- a/src/abg-reader.cc +++ b/src/abg-reader.cc @@ -2481,13 +2481,13 @@ read_size_and_alignment(xmlNodePtr node, bool got_something = false; if (xml_char_sptr s = XML_NODE_GET_ATTRIBUTE(node, "size-in-bits")) { - size_in_bits = atoi(CHAR_STR(s)); + size_in_bits = atoll(CHAR_STR(s)); got_something = true; } if (xml_char_sptr s = XML_NODE_GET_ATTRIBUTE(node, "alignment-in-bits")) { - align_in_bits = atoi(CHAR_STR(s)); + align_in_bits = atoll(CHAR_STR(s)); got_something = true; } return got_something;