From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DFECD3858D33; Sat, 20 Mar 2021 20:09:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DFECD3858D33 From: "gprocida+abigail at google dot com" To: libabigail@sourceware.org Subject: [Bug default/27616] New: libabigail treats empty and nearly empty XML elements inconsistently Date: Sat, 20 Mar 2021 20:09:09 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new 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: gprocida+abigail at google 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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-List-Received-Date: Sat, 20 Mar 2021 20:09:10 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D27616 Bug ID: 27616 Summary: libabigail treats empty and nearly empty XML elements inconsistently Product: libabigail Version: unspecified Status: UNCONFIRMED Severity: normal Priority: P2 Component: default Assignee: dodji at redhat dot com Reporter: gprocida+abigail at google dot com CC: libabigail at sourceware dot org Target Milestone: --- At least in the case of abi-corpus, the case of "no children" is handled differently from "only blank children". One consequence is that the architecture of an empty corpus may be ignored if the XML is normalised or = has blank text stripped. tests/data/test-abidiff/test-empty-corpus-2.xml: Nothing changes if the inner element is changed to. These are treated differently (abidiff reports architecture is ''): and I've not audited the code in detail, but any early return or similar short-cutting on (!node->children) etc. should be reviewed. Actually, the following shows plenty of places where whitespace is signific= ant where it should not be. find tests -name '*.abi' -or -name '*.xml' | while read f; do <"$f" sed 's;^ *;;' | tr -d '\n' >"$f".wrung build/tools/abidiff --harmless "$f" "$f".wrung done --=20 You are receiving this mail because: You are on the CC list for the bug.=