From patchwork Mon Sep 13 15:12:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: dodji at seketeli dot org X-Patchwork-Id: 44951 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 3E83B3857428 for ; Mon, 13 Sep 2021 15:12:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3E83B3857428 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1631545926; bh=lMxCV7yI57yUuvrS8qzAtoQwMYmUN3XeCcdZdzAXNCg=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Help:List-Subscribe:From:Reply-To:From; b=KokZVM3mHJfr7RXngF57Q2KB5W40MMcnrnPQ3aNBn6++8rYZGALWn1HXxRNdxosiw fkYZ+CHvuFNUJcwzB73IXnLKA0IDVgEExQiNk6E2Hi4hO/8Ismj/WriMxgvx+O+zsh /pUjZxir8jV6G2OlnnU39Cq0CvnX13MAbcrxMTmI= X-Original-To: libabigail@sourceware.org Delivered-To: libabigail@sourceware.org Received: by sourceware.org (Postfix, from userid 48) id 6B38A385802D; Mon, 13 Sep 2021 15:12:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6B38A385802D To: libabigail@sourceware.org Subject: [Bug default/28320] abidw - (non-deterministic) infinite loop in XML writer Date: Mon, 13 Sep 2021 15:12:03 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: libabigail X-Bugzilla-Component: default X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: dodji at redhat dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: dodji at redhat dot com X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 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 at redhat dot com via Libabigail From: dodji at seketeli dot org Reply-To: dodji at redhat dot com Errors-To: libabigail-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libabigail" https://sourceware.org/bugzilla/show_bug.cgi?id=28320 --- Comment #4 from dodji at redhat dot com --- Hmmh, actually, this one might be the one to try, rather: diff --git a/src/abg-writer.cc b/src/abg-writer.cc index 9f48dc92..2062c326 100644 --- a/src/abg-writer.cc +++ b/src/abg-writer.cc @@ -2356,7 +2356,8 @@ write_translation_unit(write_context& ctxt, // considered "opaque". if (class_decl_sptr class_type = is_class_type(t)) if (class_type->get_is_declaration_only() - && !ctxt.type_is_emitted(class_type)) + && !ctxt.type_is_emitted(class_type) + && !ctxt.decl_only_type_is_emitted(class_type)) write_type(class_type, ctxt, indent + c.get_xml_element_indent()); continue; @@ -2420,7 +2421,8 @@ write_translation_unit(write_context& ctxt, // We handle types which have declarations *and* function // types here. type_base_sptr t(*i, noop_deleter()); - if (!ctxt.type_is_emitted(t)) + if (!ctxt.type_is_emitted(t) + && !ctxt.decl_only_type_is_emitted(t)) { if (decl_base* d = get_type_declaration(*i)) {