Closed kstenerud closed 12 months ago
Bugsnag.framework
binary size did not change - 713,248 bytes
FILE SIZE VM SIZE
-------------- --------------
+0.0% +4 +0.0% +4 __TEXT,__text
-0.0% -4 -0.0% -4 [__TEXT]
[ = ] 0 [ = ] 0 TOTAL
Generated by :no_entry_sign: Danger
Goal
Fixes to get watchOS tests working again.
These are cherry-picked out of https://github.com/bugsnag/bugsnag-cocoa/pull/1588 and will be rebased back in once we have a working baseline.
Commit 2769b60 makes sure that the mach headers list is initialized before any other code runs. This code is called by
BSGCrashSentryInstall()
inBugsnagClient.m
, but by then it's already too late becauseBSGRunContextInit()
will have already tried to fetch the info from it. Reversing the call order ofBSGCrashSentryInstall
andBSGRunContextInit
won't work either, as they have reciprocal dependencies, so swapping them will just break other things. This is the least invasive way to reconcile it sincebsg_mach_headers_initialize()
is idempotent. A full solution would move to a phased startup architecture like in bugsnag-cocoa-performance: init, configure, start - but that would be a biiiig project!Incidentally, this last commit should also fix the mach-o UUID issue (it was failing because the mach headers list was not initialized yet), but I haven't tested that extensively to be 100% sure it fixes everything.