]> sourceware.org Git - libabigail.git/commit
Bug 24378 - DW_TAG_subroutine_type as a DIE scope causes infinite loop
authorDodji Seketeli <dodji@redhat.com>
Mon, 25 Mar 2019 13:46:31 +0000 (14:46 +0100)
committerDodji Seketeli <dodji@redhat.com>
Mon, 25 Mar 2019 13:46:31 +0000 (14:46 +0100)
commit5bb7194b0a21ac7633f539634f6f3eb7ea2a22e1
treed2aa72a0d494b778d7a7d19f569ceac408bc0d1d
parent8d60c4a2a1318c476f605953bb431cd8ca74e40e
Bug 24378 - DW_TAG_subroutine_type as a DIE scope causes infinite loop

GCC 4.3.2 wrongly emits some type definition DIEs in the scope of a
DW_TAG_subroutine_type.  Whenever the DWARF reader tries to get the
scope of a DIE during the computation of the pretty name of a type DIE
which scope is (wrongly) emitted as being a DW_TAG_subroutine_type
things end-up in an infinite loop.

This patch makes get_scope_die to look through the
DW_TAG_subroutine_type to return the proper scope instead, just like
what we already do for DW_TAG_subprogram and DW_TAG_array_type.

* src/abg-dwarf-reader.cc (get_scope_die): Look through
DW_TAG_subroutine_type to get the scope of a given DIE.
* tests/data/Makefile.am: Add the two new files below to source
distribution.
* tests/data/test-read-dwarf/PR24378-fn-is-not-scope.abi: New
reference test output.
* tests/data/test-read-dwarf/PR24378-fn-is-not-scope.o: New binary
test input.
* tests/test-read-dwarf.cc (in_out_specs): Add the new test input
to the test harness.

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