public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
From: "gprocida at google dot com" <sourceware-bugzilla@sourceware.org>
To: libabigail@sourceware.org
Subject: [Bug default/26646] unexpectedly declaration-only types
Date: Mon, 17 Jan 2022 17:46:28 +0000	[thread overview]
Message-ID: <bug-26646-9487-VbjJWWcpOx@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-26646-9487@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=26646

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:

<class-decl name='ip_mc_list' is-struct='yes' visibility='default'
is-declaration-only='yes' id='c2a59aaa'/>

vs

    <class-decl name='ip_mc_list' size-in-bits='1152' is-struct='yes'
visibility='default' id='c2a59aaa'>
      <data-member access='public' layout-offset-in-bits='0'>
...


Looking at the 2 DWARF dumps, locally at least, nothing has changed in relation
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. 

If I interpose a check for the specific type name and flip this flag to false,
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 large
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 you
have a quick fix, I'd be happy to try it out.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  parent reply	other threads:[~2022-01-17 17:46 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-22 11:35 [Bug default/26646] New: " gprocida+abigail at google dot com
2020-09-22 12:15 ` [Bug default/26646] " dodji at redhat dot com
2020-10-06 21:02 ` gprocida+abigail at google dot com
2020-10-07  9:33 ` gprocida+abigail at google dot com
2020-11-23 17:06 ` gprocida+abigail at google dot com
2022-01-17 17:46 ` gprocida at google dot com [this message]
2022-01-18  9:37 ` gprocida at google dot com
2022-01-18 11:20 ` gprocida at google dot com
2022-01-18 11:20 ` gprocida at google dot com
2022-01-18 11:32 ` gprocida at google dot com
2022-01-24 15:07 ` dodji at redhat dot com
2022-01-24 17:29 ` gprocida at google dot com
2022-02-07 10:40 ` gprocida at google dot com
2022-02-07 11:19 ` dodji at redhat dot com
2022-02-07 17:10 ` [Bug default/26646] unexpected " dodji at redhat dot com
2022-02-07 17:47 ` gprocida at google dot com
2022-02-07 21:15 ` gprocida at google dot com
2022-02-10 16:45 ` dodji at redhat dot com
2022-02-10 16:46 ` gprocida at google dot com
2022-02-10 17:21 ` gprocida at google dot com
2022-02-10 17:33 ` dodji at redhat dot com
2022-02-10 17:36 ` dodji at redhat dot com
2022-02-10 18:53 ` gprocida at google dot com
2022-02-11 12:51 ` gprocida at google dot com
2022-02-11 13:00 ` gprocida at google dot com
2022-02-24 11:09 ` dodji at redhat dot com
2022-02-24 12:16 ` gprocida at google dot com
2022-02-24 15:54 ` dodji at redhat dot com
2022-02-24 16:05 ` gprocida at google dot com
2022-02-28  9:59 ` dodji at redhat dot com
2022-02-28 10:01 ` dodji at redhat dot com
2022-03-01 14:34 ` gprocida at google dot com
2022-03-01 14:40 ` gprocida at google dot com
2022-03-02 13:34   ` Dodji Seketeli
2022-03-02 13:34 ` dodji at seketeli dot org
2022-03-02 22:36 ` gprocida at google dot com
2022-03-03 11:43 ` dodji at seketeli dot org
2022-03-03 13:32 ` gprocida at google dot com
2022-06-08 15:43 ` gprocida at google dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-26646-9487-VbjJWWcpOx@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=libabigail@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).