]> sourceware.org Git - libabigail.git/commit
Bug 18844 - assert failure in abidw at abg-dwarf-reader.cc:6537
authorDodji Seketeli <dodji@redhat.com>
Tue, 18 Aug 2015 10:33:57 +0000 (12:33 +0200)
committerDodji Seketeli <dodji@redhat.com>
Tue, 18 Aug 2015 10:33:57 +0000 (12:33 +0200)
commitba5b4452d54caf22fb1d0e847d69eef3745ea91d
tree3d96ecac82d2eb8dd429b38172d55957298cc58b
parentfce31333cbfb85501c9c8a67d434c13bd4358ae7
Bug 18844 - assert failure in abidw at abg-dwarf-reader.cc:6537

The DWARF reader is not scheduling a declaration-only class for
resolution when the class has member types.  When reading the code of
build_class_type_and_add_to_ir(), we see that the scheduling is done
before getting out of the function.  But then, building members of the
class can trigger another invocation of
build_class_type_and_add_to_ir() before the current invocation
returns.  In that case, the declaration-only class being built appears
as not being scheduled for resolution.  And that is what violates the
assertion that declaration-only classes should be scheduled for
resolution whenever they are used.

This patch addresses the issue by scheduling the resolution earlier, when
we know we are dealing with a declaration-only class, and before
dealing with members of that classes.

* src/abg-dwarf-reader.cc (build_class_type_and_add_to_ir):
Schedule declaration-only class resolution before the class
appears as usable as to other types being built.
* tests/data/test-read-dwarf/test12-pr18844.so: Add a new binary
test input.
* tests/data/test-read-dwarf/test12-pr18844.so.abi: The reference
ABI XML output for the binary above.
* tests/data/Makefile.am: Add the new test inputs above to the
source distribution.
* tests/test-read-dwarf.cc (in_out_specs): Add the new test inputs
above to the set of input this test harness has to run over.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
src/abg-dwarf-reader.cc
tests/data/Makefile.am
tests/data/test-read-dwarf/test12-pr18844.so [new file with mode: 0644]
tests/data/test-read-dwarf/test12-pr18844.so.abi [new file with mode: 0644]
tests/test-read-dwarf.cc
This page took 0.031503 seconds and 5 git commands to generate.