From 7dd6f311b81460478b2ffc2726bfd3cb0e62c9ed Mon Sep 17 00:00:00 2001 From: Josh Ferrell Date: Thu, 6 Jun 2024 15:41:32 -0400 Subject: Do not crash when DWARF supplies weird info --- rust/examples/dwarf/dwarf_import/src/dwarfdebuginfo.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'rust/examples') diff --git a/rust/examples/dwarf/dwarf_import/src/dwarfdebuginfo.rs b/rust/examples/dwarf/dwarf_import/src/dwarfdebuginfo.rs index 3f9f8faa..7ab5775a 100644 --- a/rust/examples/dwarf/dwarf_import/src/dwarfdebuginfo.rs +++ b/rust/examples/dwarf/dwarf_import/src/dwarfdebuginfo.rs @@ -249,7 +249,8 @@ impl DebugInfoBuilder { } if raw_name.is_none() && full_name.is_none() { - unreachable!("Function entry in DWARF without full or raw name. Please report this issue."); + error!("Function entry in DWARF without full or raw name. Please report this issue."); + return; } let function = FunctionInfoBuilder { -- cgit v1.3.1