Summary: | dwarf_peel_type() loops infinitely for typedef const struct ... | ||
---|---|---|---|
Product: | elfutils | Reporter: | Kubo Takehiro <kubo> |
Component: | libdw | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | elfutils-devel, mark |
Priority: | P2 | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Host: | Target: | ||
Build: | Last reconfirmed: |
Description
Kubo Takehiro
2017-03-30 02:05:54 UTC
Oops. That die argument at line 56 to dwarf_attr_integrate () should obviously have been result instead. This looks like it could never have worked. But there are various testcases that should have caught this. Unfortunately all usages in elfutils itself do dwarf_peel_type (die, die). And that invocation works just fine... Posted a patch: https://sourceware.org/ml/elfutils-devel/2017-q1/msg00149.html commit f339da994fda25b51cddc3d88182f249b75f89ff Author: Mark Wielaard <mark@klomp.org> Date: Thu Mar 30 12:19:53 2017 +0200 libdw: Fix dwarf_peel_type infinite loop. We were calling dwarf_attr_integrate () in the die in the loop instead of on the result. Which would cause an infinite loop when die != result. Add a testcase that explicitly checks this case. https://sourceware.org/bugzilla/show_bug.cgi?id=21330 Signed-off-by: Mark Wielaard <mark@klomp.org> |