From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 54B813858006; Mon, 17 Jan 2022 17:46:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 54B813858006 From: "gprocida at google dot com" To: libabigail@sourceware.org Subject: [Bug default/26646] unexpectedly declaration-only types Date: Mon, 17 Jan 2022 17:46:28 +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: gprocida 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: cc Message-ID: In-Reply-To: References: 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: Mon, 17 Jan 2022 17:46:28 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D26646 gprocida at google dot com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |gprocida at google dot com --- Comment #5 from gprocida at google dot com --- A lot of changes and fixes have happened (including to the Clang compiler) since this bug was originally opened. I have a new test case which is very stable in terms of how abidw is built.= I get identical XML for each of two Android vmlinux objects, regardless of whether built from upstream master (modulo disabling one assertion in the symtab reader) or AOSP or the Google monorepo builds. Between the two kernels, the ABIs differ only in that two types that were declared in the first ABI appear fully defined in the second. For example: vs ... Looking at the 2 DWARF dumps, locally at least, nothing has changed in rela= tion to the one type I checked. Both files have 1 declaration and 14 definitions= of the type. Tracing through abidw execution, I see differing numbers of add_or_update_class_type calls for that type. In particular, there is only one such call for first vmlinux object and I'm guessing it's for the only declaration-only DIE in the DWARF (as both appear first in the DWARF dump and in the debug output). I also noticed that the wrapper build_ir_node_from_die function hard codes = as true the is_declaration_only parameter passed to the other build_ir_node_from_die function.=20 If I interpose a check for the specific type name and flip this flag to fal= se, then I *do* see a fully-defined type in the output XML. I think the test files and this information should be enough for a proper investigation. Unfortunately, the files are rather large. If you only need = to work with the first kernel, size requirements are halved, but still too lar= ge for Bugzilla. $ ls -lh declarations.tar.bz2 vmlinux[34]{,.abidw_g3} -rw-r----- 1 gprocida primarygroup 264M Jan 17 17:19 declarations.tar.bz2 -rw-r----- 1 gprocida primarygroup 471M Jan 17 14:14 vmlinux3 -rw-r----- 1 gprocida primarygroup 7.5M Jan 17 14:32 vmlinux3.abidw_g3 -rw-r----- 1 gprocida primarygroup 471M Jan 17 14:16 vmlinux4 -rw-r----- 1 gprocida primarygroup 7.5M Jan 17 14:32 vmlinux4.abidw_g3 I was testing with ip_mc_list. These are two differences in the ABIs: $ stgdiff --abi --format small /tmp/vmlinux{3,4}.abidw_g3 -o /dev/stdout type 'struct udp_table' changed was only declared, is now fully defined type 'struct ip_mc_list' changed was only declared, is now fully defined Let me know how I can get these files to you. Alternatively, if you think y= ou have a quick fix, I'd be happy to try it out. --=20 You are receiving this mail because: You are on the CC list for the bug.=