Skip to content
Open
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
3 changes: 3 additions & 0 deletions Crashlytics/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Unreleased
- [fixed] Fixed an issue casuing a crash while symbolicating stack frames if the binary image path is null. (#16622)

# 12.18.0
- [removed] Removes unused integration with the now deprecated ObjC MetricKit API.

Expand Down
15 changes: 14 additions & 1 deletion Crashlytics/Crashlytics/Models/FIRCLSSymbolResolver.m
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,20 @@ - (BOOL)updateStackFrame:(FIRStackFrame*)frame {
[frame setOffset:addr - (uintptr_t)dlInfo.dli_saddr];
}

[frame setLibrary:[[binaryImage objectForKey:@"path"] lastPathComponent]];
NSString* library = nil;
id rawPath = [binaryImage objectForKey:@"path"];

if ([rawPath isKindOfClass:[NSString class]] && [(NSString*)rawPath length] > 0) {
library = [(NSString*)rawPath lastPathComponent];
} else if (dlInfo.dli_fname && strlen(dlInfo.dli_fname) > 0) {
library = [[NSString stringWithUTF8String:dlInfo.dli_fname] lastPathComponent];
}

if (library) {
[frame setLibrary:library];
} else {
FIRCLSSDKLog("Could not find library path\n");
}

return YES;
}
Expand Down
Loading