Skip to content

Commit

Permalink
fix(minidump): Skip TooManyRegisterRules errors in CFI (#219)
Browse files Browse the repository at this point in the history
Gimli has a hardcoded limit of 32 register rules per CFI row. There are
rare occurrences where this limit is exceeded for single rows. In this
case, it does not make sense to abort conversion, and instead just skip
the row.
  • Loading branch information
jan-auer committed Apr 16, 2020
1 parent d60346b commit 9130d84
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions minidump/src/cfi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -303,12 +303,10 @@ impl<W: Write> AsciiCfiWriter<W> {
match table.next_row() {
Ok(None) => break,
Ok(Some(row)) => rows.push(row.clone()),
Err(Error::UnknownCallFrameInstruction(_)) => {
continue;
}
Err(e) => {
return Err(e.context(CfiErrorKind::BadDebugInfo).into());
}
Err(Error::UnknownCallFrameInstruction(_)) => continue,
// NOTE: Temporary workaround for https://github.com/gimli-rs/gimli/pull/487
Err(Error::TooManyRegisterRules) => continue,
Err(e) => return Err(e.context(CfiErrorKind::BadDebugInfo).into()),
}
}

Expand Down

0 comments on commit 9130d84

Please sign in to comment.