Bug 30772 - dwarflint checking for specification recursion
Summary: dwarflint checking for specification recursion
Status: NEW
Alias: None
Product: elfutils
Classification: Unclassified
Component: tools (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-08-16 18:50 UTC by Tom Tromey
Modified: 2023-08-16 19:29 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Tromey 2023-08-16 18:50:09 UTC
This idea comes from this thread:

https://sourceware.org/pipermail/gdb-patches/2023-August/201655.html

The idea is that if a DIE refers to itself via a chain
of DW_AT_specification (or the other ways a DIE can refer
to another), then dwarflint ought to warn, as recursion like
this is never valid.
Comment 1 Mark Wielaard 2023-08-16 19:29:29 UTC
libdw dwarf_attr_integrate does prevent cycles by limiting the chain of DW_AT_abstract_origin and DW_AT_specification to 16 (arbitrary number).

On a different level, DW_AT_import can also create cycles (or rather infinite imports). __libdw_visit_scopes does contain some cycle detection.