public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
* [Bug default/21263] New: Provide finer redundant type detection from DWARF
@ 2017-01-01  0:00 dodji at redhat dot com
  2017-01-01  0:00 ` [Bug default/21263] " dodji at redhat dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: dodji at redhat dot com @ 2017-01-01  0:00 UTC (permalink / raw)
  To: libabigail

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

            Bug ID: 21263
           Summary: Provide finer redundant type detection from DWARF
           Product: libabigail
           Version: unspecified
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: default
          Assignee: dodji at redhat dot com
          Reporter: dodji at redhat dot com
                CC: libabigail at sourceware dot org
  Target Milestone: ---

When analyzing C binaries, the redundant type detector only looks at the kind
of the type, its name and its location.

That is, if a struct named foo and defined at file blah.c, line 5 column 1 is
seen twice, the second occurrence of that type is considered to be a duplicate
of the first one.  So the internal representation of the first occurrence of
the type is re-used instead of constructing an internal representation for the
second type as well.

But then, it can happen that the first struct foo defined in file blah.c:5:1 is
*different* (has a different layout, size or whatever) from the second
occurrence of foo defined at the *same* location.

In that case, today, libabigail wrongly drops the second occurrence.

The goal of this enhancement request is to improve the redundant type detector
to make it actually compare the DIEs of the two "struct foo", to see if they
are equal.

The redundant type detector would still index those types using their name and
kind.  But it would associate the name of the type to a vector of types having
the same name.

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug default/21263] Provide finer redundant type detection from DWARF
  2017-01-01  0:00 [Bug default/21263] New: Provide finer redundant type detection from DWARF dodji at redhat dot com
@ 2017-01-01  0:00 ` dodji at redhat dot com
  2017-01-01  0:00 ` dodji at redhat dot com
  2017-01-01  0:00 ` dodji at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: dodji at redhat dot com @ 2017-01-01  0:00 UTC (permalink / raw)
  To: libabigail

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

--- Comment #1 from dodji at redhat dot com ---
I think we'd even need to code a comparison engine that can compare a DIE with
an ABI artefact living in the abigail::ir namespace.

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug default/21263] Provide finer redundant type detection from DWARF
  2017-01-01  0:00 [Bug default/21263] New: Provide finer redundant type detection from DWARF dodji at redhat dot com
  2017-01-01  0:00 ` [Bug default/21263] " dodji at redhat dot com
@ 2017-01-01  0:00 ` dodji at redhat dot com
  2017-01-01  0:00 ` dodji at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: dodji at redhat dot com @ 2017-01-01  0:00 UTC (permalink / raw)
  To: libabigail

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

dodji at redhat dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED

--- Comment #2 from dodji at redhat dot com ---
So I have implemented a fix for this in the dodji/kabidiff branch in commit
https://sourceware.org/git/gitweb.cgi?p=libabigail.git;a=commit;h=f88ecac536024c6b70a605f0c1e0cc662a26914e.

So, here, to detect that two type DIEs of the same name and kind are different,
there are compared structurally (member-wise and recursively).

So we wrote an additional comparison-engine that operates in DIEs directly and
de-duplicates them before creating and IR for them.

This is hopefully going to be merged into master soon.

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug default/21263] Provide finer redundant type detection from DWARF
  2017-01-01  0:00 [Bug default/21263] New: Provide finer redundant type detection from DWARF dodji at redhat dot com
  2017-01-01  0:00 ` [Bug default/21263] " dodji at redhat dot com
  2017-01-01  0:00 ` dodji at redhat dot com
@ 2017-01-01  0:00 ` dodji at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: dodji at redhat dot com @ 2017-01-01  0:00 UTC (permalink / raw)
  To: libabigail

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

dodji at redhat dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #3 from dodji at redhat dot com ---
This has been merged into master at
https://sourceware.org/git/gitweb.cgi?p=libabigail.git;a=commit;h=b555713b4792f7892b9e03a51c9059a5e1f9fdd2

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-07-18 11:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-01  0:00 [Bug default/21263] New: Provide finer redundant type detection from DWARF dodji at redhat dot com
2017-01-01  0:00 ` [Bug default/21263] " dodji at redhat dot com
2017-01-01  0:00 ` dodji at redhat dot com
2017-01-01  0:00 ` dodji at redhat dot com

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).