public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
* [Bug default/25058] New: abigail does not recognize
@ 2019-01-01  0:00 simark at simark dot ca
  2019-01-01  0:00 ` [Bug default/25058] abigail does not handle subprogram DIEs with DW_AT_ranges instead of DW_AT_low_pc simark at simark dot ca
                   ` (13 more replies)
  0 siblings, 14 replies; 17+ messages in thread
From: simark at simark dot ca @ 2019-01-01  0:00 UTC (permalink / raw)
  To: libabigail

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

            Bug ID: 25058
           Summary: abigail does not recognize
           Product: libabigail
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: default
          Assignee: dodji at redhat dot com
          Reporter: simark at simark dot ca
                CC: libabigail at sourceware dot org
  Target Milestone: ---

When running abidiff on the provided libraries:

  abidiff liblttng-ctl2.10.so liblttng-ctl.so

some functions, like lttng_destruction_handle_wait_for_completion are
supposedly not referenced by the debug info, when in fact they are.  More
precisely, this is unexpected:

  3 Added function symbols not referenced by debug info:

     lttng_destruction_handle_wait_for_completion
     lttng_session_descriptor_destroy
     lttng_userspace_probe_location_destroy

It is correct that the function symbols are added in the new version of the
library, but it is incorrect that they are not referenced by debug info.

I traced down the problem to the fact that these functions' DIEs use
DW_AT_ranges to describe multiple PC ranges instead of DW_AT_low_pc to describe
a single range.  For example:

  0x0001bb61:   DW_TAG_subprogram
                  DW_AT_external  (true)
                  DW_AT_name     
("lttng_destruction_handle_wait_for_completion")
                  DW_AT_decl_file
("/tmp/tools-master/src/lttng-tools/src/lib/lttng-ctl/destruction-handle.c")
                  DW_AT_decl_line (237)
                  DW_AT_decl_column       (0x01)
                  DW_AT_prototyped        (true)
                  DW_AT_type      (0x0001a018
"lttng_destruction_handle_status")
                  DW_AT_ranges    (0x00002420
                     [0x0000000000018f20, 0x000000000001942d)
                     [0x0000000000011400, 0x000000000001140a))
                  DW_AT_frame_base        (DW_OP_call_frame_cfa)
                  DW_AT_GNU_all_call_sites        (true)
                  DW_AT_sibling   (0x0001c28e)

This makes abigail::dwarf_reader::read_context::get_function_address fail to
find the function address.  This makes build_function_decl fail to find the
corresponding ELF symbol, therefore not set the `is_in_public_symbol_table`
property of the function_decl.  This makes
corpus::exported_decls_builder::maybe_add_fn_to_exported_fns not add that
function to the functions described by debug info.

We would probably not see this if we built the binaries with -O0 (or at least
with -fno-reorder-blocks-and-partition), but it's still probably a bug that
abigail doesn't understand DW_AT_ranges.

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

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

end of thread, other threads:[~2019-10-04 10:38 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-01  0:00 [Bug default/25058] New: abigail does not recognize simark at simark dot ca
2019-01-01  0:00 ` [Bug default/25058] abigail does not handle subprogram DIEs with DW_AT_ranges instead of DW_AT_low_pc simark at simark dot ca
2019-01-01  0:00 ` dodji at redhat dot com
2019-01-01  0:00 ` dodji at redhat dot com
2019-01-01  0:00 ` simark at simark dot ca
2019-01-01  0:00 ` simark at simark dot ca
2019-01-01  0:00   ` Dodji Seketeli
2019-01-01  0:00 ` simark at simark dot ca
2019-01-01  0:00 ` simark at simark dot ca
2019-01-01  0:00 ` dodji at seketeli dot org
2019-01-01  0:00 ` simark at simark dot ca
2019-01-01  0:00   ` Dodji Seketeli
2019-01-01  0:00 ` mark at klomp dot org
2019-01-01  0:00 ` simark at simark dot ca
2019-01-01  0:00 ` dodji at seketeli dot org
2019-01-01  0:00 ` simark at simark dot ca
2019-01-01  0:00 ` mark at klomp dot org

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