Skip to content
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

Ios11 startup crash fix #301

Merged
merged 1 commit into from
Nov 8, 2017
Merged

Ios11 startup crash fix #301

merged 1 commit into from
Nov 8, 2017

Conversation

jkasten2
Copy link
Member

@jkasten2 jkasten2 commented Nov 8, 2017

This fixes a startup an intermittent startup crash on class_getSuperclass.

Re-based history , commit with testing with pointer range check.
12a2a7a

This change is Reviewable

* Crash was due to a bad pointer getting the supper class of the last entry from objc_getClassList
* The 2nd call can sometimes result in the last entry in the array not being initialized fully
     on iOS 11 if more classes are still being loaded into memory.
@jkasten2 jkasten2 force-pushed the ios11_startup_crash_fix branch from 78ba0ed to b1adc0a Compare November 8, 2017 00:48
@jkasten2 jkasten2 merged commit 94cfd7c into master Nov 8, 2017
@Jeasmine Jeasmine deleted the ios11_startup_crash_fix branch May 12, 2020 21:59
philipphofmann added a commit to getsentry/sentry-cocoa that referenced this pull request Oct 15, 2021
Calling class_getSuperclass sometimes leads to EXC_I386_GPFLT. OneSignal
had the same issue OneSignal/OneSignal-iOS-SDK#278
and it was fixed with OneSignal/OneSignal-iOS-SDK#301.
This PR applies the changes they did to our code to fix the problem.

Fixes GH-1395
philipphofmann added a commit to getsentry/sentry-cocoa that referenced this pull request Oct 18, 2021
Calling class_getSuperclass sometimes leads to EXC_I386_GPFLT. OneSignal
had the same issue OneSignal/OneSignal-iOS-SDK#278
and it was fixed with OneSignal/OneSignal-iOS-SDK#301.
This PR applies the changes they did to our code to fix the problem.

Fixes GH-1395
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Hard Crash on Launch Crash on iOS 11 with class_getSuperclass - SDK 2.5.4 through 2.5.6
1 participant