Message ID | 87cykjj0xh.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 1C5D43860C2F for <patchwork@sourceware.org>; Tue, 1 Oct 2024 15:31:06 +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.129.124]) by sourceware.org (Postfix) with ESMTP id 176E83857C4F for <libabigail@sourceware.org>; Tue, 1 Oct 2024 15:30:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 176E83857C4F 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 176E83857C4F Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1727796627; cv=none; b=QHfFO2rB9GvFFvIOD7+6VnEnFVEHyqhodOtvg1NDH0XEcU8weo4GHRaGO6z3lyZzxjbgJZyffyHvk4tU6HmPO6laaJDyoCT1iNMqllcemW3xRZT5M1qJTbiZMjAPIWmsnnoYeOK6OazUbdT55T0bKAN2u5ScPqW0zq3ZmebZWDs= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1727796627; c=relaxed/simple; bh=7qLAUZvsWjNe1lDRNETcoylvM8+ZVWyi5Ot61v+q0tk=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=C2WdqFrtqDKDTzmFBY1P7dMKLXutFvqIv4mQI1P4w0G6NzBKLdjSVNPWAGbwRq0c4jimzibEHlfYbvGeX3ifv/OUZpkxtv+q4IEYaf7XHmvEbBbJ9HV+mOMvXGJaq4yetz6AfJAMB5dyCjtvdVhTnajlqOJ8R/aFDeGEfrzrz3E= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1727796622; 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=CCRujGRHaydPdY5//L8zaMPg7WsM4Jiup6Kk+gaMuDg=; b=heiIAzIVvJmfhqrchrRB6PsYt9B+ZbORz0Pz/cFiAG8BHNgBve/k9HwGdmhQnXB+zzuAR0 Zrw+9dwSw9TCY3TF+oI2sP8kedBIpA8hXrRY37VopKHdqu/1l7YEbK4TQUEjf5pk5hzvLF 3E6Q5G8nr3PgVvSxCFL8ioRni8pwBko= Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-481-XJ9EdxT2Mkmmi8wM6fXxIA-1; Tue, 01 Oct 2024 11:30:21 -0400 X-MC-Unique: XJ9EdxT2Mkmmi8wM6fXxIA-1 Received: by mail-qk1-f200.google.com with SMTP id af79cd13be357-7a9a85e4a85so1285142285a.0 for <libabigail@sourceware.org>; Tue, 01 Oct 2024 08:30:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727796620; x=1728401420; 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=CCRujGRHaydPdY5//L8zaMPg7WsM4Jiup6Kk+gaMuDg=; b=K3ZhMdnVFL9si47CAYyMCCEJfzmflBNln3Nh7SQLLgA5oTpkB0GxaCHnhTIGtpjxlI Vkc12agLvKyVjcTbB6nH+xI9Ts/lQwkLXJ1qAwLdHFq+9z0xCgBGcWorqbQVzwg65ICK yTj0t5vfI528uNpiunbe3dt0gaDwhC0Fc5s9/KBHYrkmqwV/AmsG8tCmsC6BWfwB5lqY UYkGmfNB1Q9CwZPAeR1tVF+WQ083CyejXzy+JK//oVnCgvp3oh5xhrL8+RemTq4alxP/ 8IBW/G78xKGZau1YxtGutovRS+fVy8VYQn5RoZ52FBQdjuJ5k8489NsEk497Zg4USjf2 Jo8A== X-Gm-Message-State: AOJu0Yz6gAqefS1N6bs2JDhqexK2k1q/txFD41v1/NP0XQtXLoRuNKMn o8kCf5qo+tCG20X8V6LGWHznFK3RQLSM8+MqPQebVGoMjoJ0HeY5TD+wip3NGkaYgx4Pp432Vn0 zv6Aro0Ar7DiuvWLu/ZhO7bd2lLndcMqexpQlBa/tf3V6BWcHpPm4Ck7eDK+NTlcpbH/vjdKer/ yEAGMnC1h+ZlL3Tte9zJ/Qi1SN08WxC0DSpPQ7ng== X-Received: by 2002:a05:620a:1a18:b0:7a9:9fd5:2e28 with SMTP id af79cd13be357-7ae6272eca9mr6318985a.57.1727796620723; Tue, 01 Oct 2024 08:30:20 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGNYa4q2fIGWxtjpP1eFDwrcQGu0jDq6dBhAQqaGlxtwAu3u/ERIMMiL3Vt+sIWiZU+p06c0A== X-Received: by 2002:a05:620a:1a18:b0:7a9:9fd5:2e28 with SMTP id af79cd13be357-7ae6272eca9mr6316485a.57.1727796620288; Tue, 01 Oct 2024 08:30:20 -0700 (PDT) Received: from localhost (88-120-130-27.subs.proxad.net. [88.120.130.27]) by smtp.gmail.com with ESMTPSA id af79cd13be357-7ae3782cd47sm515603585a.79.2024.10.01.08.30.19 for <libabigail@sourceware.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Oct 2024 08:30:19 -0700 (PDT) Received: by localhost (Postfix, from userid 1000) id 51AEA507A61B; Tue, 1 Oct 2024 17:30:18 +0200 (CEST) From: Dodji Seketeli <dodji@redhat.com> To: libabigail@sourceware.org Subject: [PATCH, applied] writer: Do not crash on ABI corpora that have no associated path Organization: Red Hat / France X-Operating-System: AlmaLinux 9.4 X-URL: http://www.redhat.com Date: Tue, 01 Oct 2024 17:30:18 +0200 Message-ID: <87cykjj0xh.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.0 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_H3, 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 |
[applied] writer: Do not crash on ABI corpora that have no associated path
|
|
Commit Message
Dodji Seketeli
Oct. 1, 2024, 3:30 p.m. UTC
Hello,
When write_context::record_corpus_as_emitted is invoked on an ABI
corpus that has no associated path, it crashes as that violates an
assert.
This patch loosens the assert, allowing ABI corpora with no associated
paths to be handled.
* src/abg-writer.cc (write_context::record_corpus_as_emitted):
Allow corpus without path.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
---
src/abg-writer.cc | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/abg-writer.cc b/src/abg-writer.cc index edd85326..b0bd095e 100644 --- a/src/abg-writer.cc +++ b/src/abg-writer.cc @@ -807,9 +807,8 @@ public: return; const string& path = corp->get_path(); - ABG_ASSERT(!path.empty()); - - m_emitted_corpora_set.insert(path); + if (!path.empty()) + m_emitted_corpora_set.insert(path); } /// Get the set of types that have been emitted.