diff --git a/CHANGELOG.md b/CHANGELOG.md index 4eed8a25..bc4c841c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ ## Unreleased +**Fixes** +- symbolic-cfi: Skip invalid FDEs when converting DWARF to Breakpad CFI ([#868](https://github.com/getsentry/symbolic/pull/868)) + **Internal**: - Removed `dmsort` dependency and replaced uses with stable std sorts. ([#869](https://github.com/getsentry/symbolic/pull/869)) diff --git a/symbolic-cfi/src/lib.rs b/symbolic-cfi/src/lib.rs index faf64097..7bc69b7a 100644 --- a/symbolic-cfi/src/lib.rs +++ b/symbolic-cfi/src/lib.rs @@ -717,6 +717,15 @@ impl AsciiCfiWriter { R: Reader + Eq, U: UnwindSection, { + // We have seen FDEs with an initial address of `u64::MAX` in user-provided + // DWARF files. Such FDEs will invariably fail to process because of either + // an address overflow error in `gimli` or an underflow in the `length` + // calculation below. Therefore, we skip them immediately so we don't abort + // the processing of the entire file. + if fde.initial_address() == u64::MAX { + return Ok(()); + } + // Retrieves the register that specifies the return address. We need to assign a special // format to this register for Breakpad. let ra = fde.cie().return_address_register();