Skip to content

Commit

Permalink
fix: Only skip one fn when encountering unknown Unwind Codes on Win-x…
Browse files Browse the repository at this point in the history
…64 (#588)
  • Loading branch information
Swatinem authored May 30, 2022
1 parent fc8db82 commit 8c9eabc
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## Unreleased

**Fixes**:

- Only skip one function when encountering unknown Unwind Codes on Windows x64. ([#588](https://github.com/getsentry/symbolic/pull/588))

## 8.7.3

**Fixes**:
Expand Down
10 changes: 6 additions & 4 deletions symbolic-minidump/src/cfi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -907,7 +907,7 @@ impl<W: Write> AsciiCfiWriter<W> {
let mut saved_regs = Vec::new();
let mut unwind_codes = Vec::new();

for function_result in exception_data {
'functions: for function_result in exception_data.functions() {
let function =
function_result.map_err(|e| CfiError::new(CfiErrorKind::BadDebugInfo, e))?;

Expand Down Expand Up @@ -936,13 +936,15 @@ impl<W: Write> AsciiCfiWriter<W> {
.map_err(|e| CfiError::new(CfiErrorKind::BadDebugInfo, e))?;

unwind_codes.clear();
for code_result in &unwind_info {
for code_result in unwind_info.unwind_codes() {
// Due to variable length encoding of operator codes, there is little point in
// continuiing after this. Other functions in this object file can be valid, so
// continuing after this. Other functions in this object file can be valid, so
// swallow the error and continue with the next function.
let code = match code_result {
Ok(code) => code,
Err(_) => return Ok(()),
Err(_) => {
continue 'functions;
}
};
unwind_codes.push(code);
}
Expand Down

0 comments on commit 8c9eabc

Please sign in to comment.