-
Notifications
You must be signed in to change notification settings - Fork 133
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
RUMM-1883 Report binary image with no UUID #724
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -150,7 +150,7 @@ internal struct DDCrashReportExporter { | |
|
||
return DDCrashReport.BinaryImage( | ||
libraryName: image.imageName, | ||
uuid: image.uuid, | ||
uuid: image.uuid ?? unavailable, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is still relevant to report binary images with no UUID, like we do for missing architecture. Without uuid nor arch, symbolication won't be possible, but this will give more info to the crash report and help us identify missing data. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Double checking - this will be possible to differentiate one There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes. We shouldn't even get |
||
architecture: image.codeType?.architectureName ?? unavailable, | ||
isSystemLibrary: image.isSystemImage, | ||
loadAddress: loadAddressHex, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's safe, but wanted to double check if this won't crash if
imageUUID
isnil
? In PLCR it is defined as implicitly unwrappedString
:Hence, previous code was checking
imageInfo.hasImageUUID
before evaluating it.The problem with implicit unwrapping is common to many
PLCR
types/fields and is solved by ourCrashReport
(swift). This test should already cover it:dd-sdk-ios/Tests/DatadogCrashReportingTests/PLCrashReporterIntegration/CrashReportTests.swift
Line 65 in 3b43f91
but for the sake of sanity, let's double check if it does.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without
NS_ASSUME_NONNULL_*
region or_Nonnull
objc annotation, the property is implicitly unwrapped optional, so this won't crash asuuid
is now optional. The previous check was not necessary since theguard let
was already evaluating nullability.But I can checks in test tho 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's actually already covered in test :)
dd-sdk-ios/Tests/DatadogCrashReportingTests/Mocks.swift
Line 144 in 3b43f91