You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe it's likely to be harmless, but also think it should be fixed to reduce noise, and technically the results of undefined behaviour are somewhat unlimited.
[REQUIRED] Step 1: Describe your environment
CocoaPods
[REQUIRED] Step 2: Describe the problem
Running on iOS with UBSan enabled (https://developer.apple.com/documentation/code_diagnostics/undefined_behavior_sanitizer/enabling_the_undefined_behavior_sanitizer?language=objc) I hit a piece of undefined behaviour in Crashlytics which causes UBSan to break into the debugger with an "Invalid Boolean" error.
I believe it's likely to be harmless, but also think it should be fixed to reduce noise, and technically the results of undefined behaviour are somewhat unlimited.
Steps to reproduce:
Enable UBSan (https://developer.apple.com/documentation/code_diagnostics/undefined_behavior_sanitizer/enabling_the_undefined_behavior_sanitizer?language=objc)
Run a project with Crashlytics for the first time.
Observe that UBSan breaks due to an invalid value for isDirectory in loadDefaults. This is because isDirectory is not initialized when it's declared, nor is it initialised during the call to fileExistsAtPath (https://developer.apple.com/documentation/foundation/nsfilemanager/1410277-fileexistsatpath?language=objc) because "If path doesn’t exist, this value is undefined upon return. "
The simplest fix would be to remove isDirectory from the "else if (!fileExists && !isDirectory)" condition changing it to "else if (!fileExists) "
The text was updated successfully, but these errors were encountered: