diff options
| author | Josh Ferrell <josh@vector35.com> | 2025-11-19 17:20:39 -0500 |
|---|---|---|
| committer | Josh Ferrell <josh@vector35.com> | 2025-11-19 17:20:39 -0500 |
| commit | 06c5d79df2f784edd4cbe6a3be1f5576c7b78dda (patch) | |
| tree | 8ddf3387262941794ee8add12df549ddf6f89663 /plugins/dwarf | |
| parent | 10dd8336d9fb48c6bb56bbc16d8941f84c4dde1d (diff) | |
[DWARF] Fix incorrect error messages for empty lexical blocks
Diffstat (limited to 'plugins/dwarf')
| -rw-r--r-- | plugins/dwarf/dwarf_import/src/functions.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/dwarf/dwarf_import/src/functions.rs b/plugins/dwarf/dwarf_import/src/functions.rs index 532b88a2..7ed94810 100644 --- a/plugins/dwarf/dwarf_import/src/functions.rs +++ b/plugins/dwarf/dwarf_import/src/functions.rs @@ -240,6 +240,9 @@ pub(crate) fn parse_lexical_block<R: ReaderType>( if low_pc < high_pc { result.insert(low_pc..high_pc); + } else if low_pc == high_pc { + // Ranges where start == end may be ignored (DWARFv5 spec, 2.17.3 line 17) + return None; } else { error!( "Invalid lexical block range: {:#x} -> {:#x}", |
