Skip to content

Commit 7dd6f31

Browse files
committed
Do not crash when DWARF supplies weird info
1 parent 9319302 commit 7dd6f31

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

rust/examples/dwarf/dwarf_import/src/dwarfdebuginfo.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,8 @@ impl DebugInfoBuilder {
249249
}
250250

251251
if raw_name.is_none() && full_name.is_none() {
252-
unreachable!("Function entry in DWARF without full or raw name. Please report this issue.");
252+
error!("Function entry in DWARF without full or raw name. Please report this issue.");
253+
return;
253254
}
254255

255256
let function = FunctionInfoBuilder {

0 commit comments

Comments
 (0)