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

Fix DYLD lock mechanism preventing compilation on iOS <10 #675

Merged
merged 7 commits into from
Jun 5, 2020

Conversation

fractalwrench
Copy link
Contributor

This changeset is a port of #674 for bugsnag-cocoa v5 - original PR description copied below:

Goal

The previous fix for a DYLD deadlock issue has compile-time checks that determine the locking mechanism to use. This can cause apps with low deployment targets to fail IRL due to being built and tested on more modern OSs.

Design

The previous lock determination mechanism was purely compile-time #ifdef-based. This fix uses a combination of checks:

  • Compile-time to determine the OS-type without resorting to weakly supported hybrid checks
  • Run-time to determine the version of the OS in a cross-platform way.

The bulk of the logic was moved from setting #defines in the header to the combination approach in the main .m file.

The fix was targeted at v6 due to ongoing UAT but could also easily be back-ported to the v5 release.

Changeset

BSG_KSMachHeaders and BSG_KSCrash

Tests

Run on both real iOS 9.3 iPad and in v13.X simulator.

Bugsnag.podspec.json Outdated Show resolved Hide resolved
Bugsnag.podspec.json Outdated Show resolved Hide resolved
Source/BugsnagNotifier.m Outdated Show resolved Hide resolved
VERSION Outdated Show resolved Hide resolved
VERSION Outdated Show resolved Hide resolved
@twometresteve
Copy link
Contributor

In terms of testing I'm content that the our CI pipeline is generally sufficient for this to be merged, but we will need to manually test for regression of the original fix on an appropriate selection of platforms/OS versions before releasing.

@fractalwrench fractalwrench merged commit d87a62f into master Jun 5, 2020
@fractalwrench fractalwrench deleted the master-fix-locking branch June 5, 2020 09:11
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.

4 participants