feat(cli): Symbolicate remote apple crash reports#1923
Merged
Conversation
loewenheim
approved these changes
Apr 13, 2026
|
|
||
| if &magic == b"MDMP" || &magic == b"PMDM" { | ||
| Ok(Payload::Minidump(file)) | ||
| } else if &magic == b"Inci" || &magic == b"----" { |
There was a problem hiding this comment.
Bug: The code classifies files starting with b"----" as Apple crash reports, but the downstream parser likely doesn't support this format, which will cause a runtime crash.
Severity: HIGH
Suggested Fix
Remove the || &magic == b"----" check. Alternatively, if this format is valid, add test cases with fixtures that start with b"----" to verify the parser can handle them. Also, add documentation explaining what this format represents.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.
Location: crates/symbolicli/src/main.rs#L275
Potential issue: The code adds a check for `b"----"` to identify Apple crash reports.
When a file with these magic bytes is encountered, it's passed to
`AppleCrashReport::from_reader()`. However, there is no evidence that the
`apple_crash_report_parser` crate supports this format. This will likely cause the
parser to fail, resulting in an unhandled error that crashes the `symbolicli` tool with
the message "failed to parse apple crash report". This can be triggered in online mode
if a Sentry event has an `event.applecrashreport` attachment starting with `----`.
Did we get this right? 👍 / 👎 to inform future reviews.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#1900 added the ability to symbolicate apple crash reports with symbolicli in
--offlinemode. This PR extends the functionality to also support--onlinemode.ref: #1884