Bug 25229 - Add input verification phase
Summary: Add input verification phase
Status: NEW
Alias: None
Product: dwz
Classification: Unclassified
Component: default (show other bugs)
Version: unspecified
: P2 enhancement
Target Milestone: ---
Assignee: Nobody
Depends on: 27568
  Show dependency treegraph
Reported: 2019-11-28 12:28 UTC by Tom de Vries
Modified: 2024-02-03 13:30 UTC (History)
2 users (show)

See Also:
Last reconfirmed:


Note You need to log in before you can comment on or make changes to this bug.
Description Tom de Vries 2019-11-28 12:28:57 UTC
I've just committed a fix for PR24169, which makes dwz generate an error for a certain type of invalid dwarf, in this case an invalid DW_FORM_ref_addr reference.

The fix follows the just-in-time style of the implementation in the sense that it generates the error when and where it encounters it, in this case in write_die.

There are a number of problem with this approach:
- errors are not detected reliably: if dwz decides that it's not a good idea to
  optimize the file, it will not report an error, because we never get to
- the error may have to be handled in more than one location.
- it may take relatively long before the error is detected.

The fix for this is to have a verify phase (before or in combination with read_debug_info). Such a phase would obviously add more processing time, so it would be good to have the user to be able to switch that on or off.
Comment 1 Tom de Vries 2019-11-28 16:29:15 UTC
Patch in attachment 11587 [details] has a type of verification phase.