From 7d72d25998116ae4ebb8d911ee9dad31ffa60ea0 Mon Sep 17 00:00:00 2001 From: ElykDeer Date: Tue, 1 Apr 2025 11:13:47 -0400 Subject: DWARF Parser: Remove error log and ignore lexical ranges that start and end at 0 --- plugins/dwarf/dwarf_import/src/functions.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'plugins') diff --git a/plugins/dwarf/dwarf_import/src/functions.rs b/plugins/dwarf/dwarf_import/src/functions.rs index 9f2669aa..5b228713 100644 --- a/plugins/dwarf/dwarf_import/src/functions.rs +++ b/plugins/dwarf/dwarf_import/src/functions.rs @@ -209,6 +209,11 @@ pub(crate) fn parse_lexical_block( return None; }; + // DWARFv5 spec section 2.17 allows for undefined behavior in cases where the object currently being referred to doesn't exist + if low_pc == 0 && high_pc == 0 { + return None; + } + if low_pc < high_pc { result.insert(low_pc..high_pc); } else { -- cgit v1.3.1