fixes a crash on tvOS 10 Foundation framework dump at NSLeafProxy #16
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.
When running on tvOS 10.x it crashes on a full dump when it hits NSLeafProxy in Foundation:
./classdump-dyld -o tvOSH2 -c -D
Now dumping /System/Library/Caches/com.apple.dyld/dyld_shared_cache_arm64...
2017-03-22 10:29:41.156 classdump-dyld[22900:558139] classdump-dyld : Current Image /usr/lib/libSystem.B.dylib
....
[truncated for brevity]
....
72% [==================================== ] 450/624
2017-03-22 10:29:56.295 classdump-dyld[22900:558139] classdump-dyld : Processing Class NSDocumentSerializer
2017-03-22 10:29:56.303 classdump-dyld[22900:558139] classdump-dyld : Processing Class NSDirInfoSerializer
2017-03-22 10:29:56.341 classdump-dyld[22900:558139] classdump-dyld : Processing Class NSDirInfoDeserializer
2017-03-22 10:29:56.349 classdump-dyld[22900:558139] classdump-dyld : Processing Class NSLeafProxy
2017-03-22 10:29:56.350 classdump-dyld[22900:558139] *** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSSingleObjectArrayI objectAtIndex:]: index 1 beyond bounds [0 .. 0]'
*** First throw call stack:
(0x1961e251c 0x1957d455c 0x1961d3784 0x1000e87b4 0x1000ebec4 0x1000ef574 0x195c59674)
Abort trap: 6
I traced the error to this section of ParsingFunctions, there may be a more proper fix to this, but this at least prevents the crash from happening and allows it to run through the full cache dump successfully.