From 06c5d79df2f784edd4cbe6a3be1f5576c7b78dda Mon Sep 17 00:00:00 2001 From: Josh Ferrell Date: Wed, 19 Nov 2025 17:20:39 -0500 Subject: [DWARF] Fix incorrect error messages for empty lexical blocks --- plugins/dwarf/dwarf_import/src/functions.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'plugins') 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( 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}", -- cgit v1.3.1