summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorJosh Ferrell <josh@vector35.com>2025-11-19 17:20:39 -0500
committerJosh Ferrell <josh@vector35.com>2025-11-19 17:20:39 -0500
commit06c5d79df2f784edd4cbe6a3be1f5576c7b78dda (patch)
tree8ddf3387262941794ee8add12df549ddf6f89663 /plugins
parent10dd8336d9fb48c6bb56bbc16d8941f84c4dde1d (diff)
[DWARF] Fix incorrect error messages for empty lexical blocks
Diffstat (limited to 'plugins')
-rw-r--r--plugins/dwarf/dwarf_import/src/functions.rs3
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}",