Skip to content

Commit 06c5d79

Browse files
committed
[DWARF] Fix incorrect error messages for empty lexical blocks
1 parent 10dd833 commit 06c5d79

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

plugins/dwarf/dwarf_import/src/functions.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,9 @@ pub(crate) fn parse_lexical_block<R: ReaderType>(
240240

241241
if low_pc < high_pc {
242242
result.insert(low_pc..high_pc);
243+
} else if low_pc == high_pc {
244+
// Ranges where start == end may be ignored (DWARFv5 spec, 2.17.3 line 17)
245+
return None;
243246
} else {
244247
error!(
245248
"Invalid lexical block range: {:#x} -> {:#x}",

0 commit comments

Comments
 (0)