[Bug default/19173] Abidiff doesn't detect symbol size change in library.

woodard at redhat dot com sourceware-bugzilla@sourceware.org
Thu Jan 1 00:00:00 GMT 2015


--- Comment #10 from Ben Woodard <woodard at redhat dot com> ---
(In reply to Maxim Ostapenko from comment #9)
> GCC uses DW_AT_upper_bound to represent array upper bound while Clang uses
> DW_AT_count. Looking to source code of libabigail, I noticed that
> build_array_type function from abg-dwarf-reader.cc handles
> DW_AT_upper_bound, but not DW_AT_count. Is this intentional?

I can almost guarantee the answer to this is "no".

The standard says:

The subrange entry may have the attributes DW_AT_lower_bound and
DW_AT_upper_bound to specify, respectively, the lower and upper bound values of
the subrange. The DW_AT_upper_bound attribute may be replaced by a DW_AT_count
attribute, whose value describes the number of elements in the subrange rather
than the value of the last element. The value of each of these attributes is
determined as described in Section 2.19.

So I would say that you uncovered 2 related bugs.
1) The fact that libabigail doesn't handle DW_AT_count
2) Logic that makes them equivalent in cases where it can be assumed that the
lower bound is zero. This is needed to be able to correctly compare the ABI
between ELF files generated by different compilers.

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

More information about the Libabigail mailing list