]> sourceware.org Git - libabigail.git/commit
Bug 18535 - abidiff reports false positive ABI difference for libstdc++
authorDodji Seketeli <dodji@redhat.com>
Thu, 24 Sep 2015 09:00:12 +0000 (11:00 +0200)
committerDodji Seketeli <dodji@redhat.com>
Thu, 24 Sep 2015 09:51:56 +0000 (11:51 +0200)
commitd0b8ef652150162b188bf9942de3a4bfcb42b613
tree2398e834f1aa763cc93285e5b4f5966e48c245df
parent8e05364ac50f413f26a6e01e1146e9475397e1b8
Bug 18535 - abidiff reports false positive ABI difference for libstdc++

When the DWARF reader of libabigail sees a data member for a given
class flagged as being a declaration, it considers the declaration as
being a definition.  The reason why it doesn't strictly trust the
"is_declaration" flag of DWARF is that some DWARF producers sometimes
wrongly emit that flag.

But then, it turns out that a class declaration can have a *static*
data member without loosing its declaration-only property.  This patch
thus changes the behaviour of the DWARF reader to make it consider the
class declaration as being a definition when the class has a
*non-static* data member; a static data member only is not enough to
make the class declaration become a definition.

* src/abg-dwarf-reader.cc (build_class_type_and_add_to_ir): The
presence of a data member shouldn't make a declaration-only class
loose its declaration-only-ness; the presence of a enon-static*
data member should.
* tests/data/test-read-dwarf/test15-pr18892.so.abi: Adjust.
* tests/data/test-read-dwarf/test16-pr18904.so.abi: Likewise.
* tests/data/test-diff-filter/test31-pr18535-libstdc++-4.8.3.so:
New binary test input.
* tests/data/test-diff-filter/test31-pr18535-libstdc++-4.9.2.so:
Likewise.
* tests/data/test-diff-filter/test31-pr18535-libstdc++-report-0.txt:
New test reference output.
* tests/data/Makefile.am: Add the new test material to the build
system.
* tests/test-diff-filter.cc (in_out_specs): Add the new test
inputs to the set of inputs to consider.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
src/abg-dwarf-reader.cc
tests/data/Makefile.am
tests/data/test-diff-filter/test31-pr18535-libstdc++-4.8.3.so [new file with mode: 0755]
tests/data/test-diff-filter/test31-pr18535-libstdc++-4.9.2.so [new file with mode: 0755]
tests/data/test-diff-filter/test31-pr18535-libstdc++-report-0.txt [new file with mode: 0644]
tests/data/test-read-dwarf/test15-pr18892.so.abi
tests/data/test-read-dwarf/test16-pr18904.so.abi
tests/test-diff-filter.cc
This page took 0.098929 seconds and 5 git commands to generate.