Message ID | 87bk3utel4.fsf@redhat.com |
---|---|
State | New |
Headers |
Return-Path: <libabigail-bounces+patchwork=sourceware.org@sourceware.org> 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 373903830B4F for <patchwork@sourceware.org>; Fri, 21 Jun 2024 17:01:39 +0000 (GMT) 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.133.124]) by sourceware.org (Postfix) with ESMTPS id 4C0B938319CF for <libabigail@sourceware.org>; Fri, 21 Jun 2024 17:01:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4C0B938319CF Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 4C0B938319CF Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718989294; cv=none; b=xKK93vYi2MHnKeFGG0pJhJMDNDl4jQdmTtpyVjz9ZuGfSETy2QzwrXKloOKoiZQCs0q66k/Z7pTVS3kvLkfiW1AkLaWGkUMZqnjJtXJhem+2gf/sN0wuEuYxuHvQ78kl4RZ3/L+AZWrZko5Dg6ymAbxSvU+dl44w3Ug5JPJPaYU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718989294; c=relaxed/simple; bh=8I734PqM3hKbkpLvwnhEkmIfOvp3xEIITQc55XbrhOw=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=OGb5WQfgtD1Fff318S7kWCNFpw2h/4r6cXWsaodk+ubT+5dPVPSBWqFnj8uFMBx86YOeKJbhBWrVKQz7aq3xM+raOgWVXKxPcdbhRix9LvcEUri4fqNGobnAcf9vsIwBGUjEJ8GYGFffgYLurI0kqhVLQa0qJYja3HaO5j6OEIs= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1718989293; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=42jJ1BX1DfYm6bHdyARyU5lTnSjIUzTkMeO5WX2OMFc=; b=CMs8+hxQol+9P/N8g3p51NzSrbDowHZ0oyXXg7jA2KOPRxnXArQaOITrabtJCrVwZ1YQeL 94Oyo3ds3N6L7zpS70s2u1BUIt997g3d25YYCo2CDIdUSZsRc6h5WJnXuS90CUflBPdYP8 W3F+PQzBMZ+G1PvwSc83XNbeBLyFR8Q= Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-230-VRmGIFoBOt6V11wJ5MRVPg-1; Fri, 21 Jun 2024 13:01:31 -0400 X-MC-Unique: VRmGIFoBOt6V11wJ5MRVPg-1 Received: by mail-qk1-f197.google.com with SMTP id af79cd13be357-795cce8b773so324405685a.3 for <libabigail@sourceware.org>; Fri, 21 Jun 2024 10:01:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718989291; x=1719594091; h=mime-version:user-agent:message-id:date:organization:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=42jJ1BX1DfYm6bHdyARyU5lTnSjIUzTkMeO5WX2OMFc=; b=COIkegOrakOytDjmaNt2uFZTQ86Uh5ZxgZbTk2hq7wORD1yI9/RTxOV+qkOH925Fsl X68BrXxjPJWPDjvtHpzQgo9huExyZpkySVlPGEt/+cfLQZZtyE0MFfaL6ewip5ENrscO cPGVp0sY2WMd+TvlyC00E2cZ+4/JCqHge648KQQzkh0Bh+LQLO+70onY2+sEtPE3OKTr 7rS6bbj51GDDts9HCdXJ2JfKdBjzy7fZ6Vcv+/bHbnb4eKTeSdno0xkb6uPDzt7x5x+o WzF6HUu0wXe5vBxAPhai52E3yfTMdo/uXP28fW5H2aWubOdNcj+b/VIiopxO8axpKHcc w9dA== X-Gm-Message-State: AOJu0YwwP1ipa/Rp5O49dRS0QID1jLjF1mI9VCoUdY4lhRsWbF4MUs4g UIBwdzBwyk3aGdL9klQz02Nd6p6HJppd9+h07FSOE/dRy6MoUpbfFIbGAJL/oGtGd+ICrS9H1Jo DMz8eKder/29ZLeIkiWhFeQvAq6TaBNyxkvPkZn6TyjEaYjBkLIY4U/KAbrjkx/I3pApyyqUHon B5IlN7oD9SCZBGmyIZq6n3ct8357Gz4XSypHBwwQ== X-Received: by 2002:a05:620a:3902:b0:795:89c4:9bfc with SMTP id af79cd13be357-79bb3ee5201mr991314585a.76.1718989290695; Fri, 21 Jun 2024 10:01:30 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFM20Gsu4QQxAb8ZMpBCq2JQKq9uaGuj5P/+3YVmzVRtu5oIdfQYEma9t7PPs7u0FTqPieLPQ== X-Received: by 2002:a05:620a:3902:b0:795:89c4:9bfc with SMTP id af79cd13be357-79bb3ee5201mr991310385a.76.1718989290044; Fri, 21 Jun 2024 10:01:30 -0700 (PDT) Received: from localhost (88-120-130-27.subs.proxad.net. [88.120.130.27]) by smtp.gmail.com with ESMTPSA id af79cd13be357-79bce8c4736sm101601785a.61.2024.06.21.10.01.29 for <libabigail@sourceware.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Jun 2024 10:01:29 -0700 (PDT) Received: by localhost (Postfix, from userid 1000) id 8C17BC1B7841; Fri, 21 Jun 2024 19:01:27 +0200 (CEST) From: Dodji Seketeli <dodji@redhat.com> To: libabigail@sourceware.org Subject: [PATCH] btf-reader: Add missing data members reset to reader::initialize Organization: Red Hat / France X-Operating-System: AlmaLinux 9.4 X-URL: http://www.redhat.com Date: Fri, 21 Jun 2024 19:01:27 +0200 Message-ID: <87bk3utel4.fsf@redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-12.1 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_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libabigail@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Mailing list of the Libabigail project <libabigail.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/libabigail>, <mailto:libabigail-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/libabigail/> List-Post: <mailto:libabigail@sourceware.org> List-Help: <mailto:libabigail-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/libabigail>, <mailto:libabigail-request@sourceware.org?subject=subscribe> Errors-To: libabigail-bounces+patchwork=sourceware.org@sourceware.org |
Series |
btf-reader: Add missing data members reset to reader::initialize
|
|
Commit Message
Dodji Seketeli
June 21, 2024, 5:01 p.m. UTC
Hello,
btf::reader::initialize forgets to reset a few data members used
during binary type information loading. This resetting is key to get
the reader ready for being re-used to load a new binary, like a kernel
module. Otherwise, the working set just keeps growing unnecessarily.
* src/abg-btf-reader.cc (btf::reader::initialize): Clear
types_to_canonicalize_, btf_type_id_to_artifacts_ and cur_tu_.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
---
src/abg-btf-reader.cc | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/abg-btf-reader.cc b/src/abg-btf-reader.cc index a8131fd7..e4aca24f 100644 --- a/src/abg-btf-reader.cc +++ b/src/abg-btf-reader.cc @@ -240,6 +240,9 @@ protected: { btf__free(btf_handle_); btf_handle_ = nullptr; + types_to_canonicalize_.clear(); + btf_type_id_to_artifacts_.clear(); + cur_tu_.reset(); elf_based_reader::initialize(elf_path, debug_info_root_paths); options().load_all_types = load_all_types; options().load_in_linux_kernel_mode = linux_kernel_mode;