Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Only skip one fn when encountering unknown Unwind Codes on Win-x64 #588

Merged
merged 1 commit into from
May 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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