-
Notifications
You must be signed in to change notification settings - Fork 37
Fix GDTCORDirectorySizeTracker crash #163
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
Conversation
Coverage Report 1Affected Products
Test Logs |
ncooke3
left a comment
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.
Based on the trace firebase/firebase-ios-sdk#15414 (comment), we crash on enumeration due to a non-recoverable error in malloc, so we won't get to the error handler.
So I don't think we should change the error handler's return value because it could affect behavior in other cases and result in inaccurate sizing.
This won't fix the crash but we could log the error in the handler. It's possibly it could help further debugging.
If memory is corrupted from somewhere else, looping over the file system may be what is increasing the odds of trying to allocate this corrupted memory.
I audited how we use nanopb (C) and didn't find any memory vulnerabilites.
GoogleDataTransport/GDTCORTests/Unit/GDTCORDirectorySizeTrackerTests.m
Outdated
Show resolved
Hide resolved
Co-authored-by: Nick Cooke <36927374+ncooke3@users.noreply.github.com>
…rTests.m Co-authored-by: Nick Cooke <36927374+ncooke3@users.noreply.github.com>
Log error to help debug firebase/firebase-ios-sdk#15414