iOS app crash due to exchangei_spork.o in libhps_sprk_exchange.a

Hi,

We encountered a new crash issue after we upgraded our deployment target from iOS 13 to iOS 14. We analyzed the stack trace the link map and found out that exchg_registrar::exchg_registrar() from exchangei_spork.o in libhps_sprk_exchange.a is getting hit with a KERN_INVALID_ADDRESS exception whenever the app is running the dynamic linker initialization function findAndRunAllInitializers. We didn’t have this issue prior to upgrading the deployment target to iOS 14 so we think the way we statically link the library should not be the problem.

Here’s the stack strace:

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000000000000
Exception Codes: 0x0000000000000001, 0x0000000000000000

Termination Reason: SIGNAL 11 Segmentation fault: 11
Terminating Process: exc handler [630]

Triggered by Thread:  0
Thread 0 name:   Dispatch queue: com.apple.main-thread
Thread 0 Crashed:

0   fieldwire 0x1072455cc exchg_registrar::exchg_registrar() + 36
1   fieldwire 0x1072455cc exchg_registrar::exchg_registrar() + 36
2   dyld      0x1e53e3bdc invocation function for block in dyld4::Loader::findAndRunAllInitializers(dyld4::RuntimeState&) const + 144
3   dyld      0x1e5432d08 invocation function for block in dyld3::MachOAnalyzer::forEachInitializer(Diagnostics&, dyld3::MachOAnalyzer::VMAddrConverter const&, void (unsigned int) block_pointer, void const*) const + 332
4   dyld      0x1e53e23d0 invocation function for block in dyld3::MachOFile::forEachSection(void (dyld3::MachOFile::SectionInfo const&, bool, bool&) block_pointer) const + 516
5   dyld      0x1e53e1868 dyld3::MachOFile::forEachLoadCommand(Diagnostics&, void (load_command const*, bool&) block_pointer) const + 280
6   dyld      0x1e53e0d7c dyld3::MachOFile::forEachSection(void (dyld3::MachOFile::SectionInfo const&, bool, bool&) block_pointer) const + 164
7   dyld      0x1e53eb94c dyld3::MachOAnalyzer::forEachInitializer(Diagnostics&, dyld3::MachOAnalyzer::VMAddrConverter const&, void (unsigned int) block_pointer, void const*) const + 376
8   dyld      0x1e53e8758 dyld4::Loader::findAndRunAllInitializers(dyld4::RuntimeState&) const + 148
9   dyld      0x1e53e2100 dyld4::PrebuiltLoader::runInitializers(dyld4::RuntimeState&) const + 40
10  dyld      0x1e53e5388 dyld4::Loader::runInitializersBottomUp(dyld4::RuntimeState&, dyld3::Array<dyld4::Loader const*>&) const + 212
11  dyld      0x1e53ea0bc dyld4::Loader::runInitializersBottomUpPlusUpwardLinks(dyld4::RuntimeState&) const + 176
12  dyld      0x1e5419608 dyld4::APIs::runAllInitializersForMain() + 292
13  dyld      0x1e53f2648 dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const*) + 2876
14  dyld      0x1e53f0d88 start + 1992
```.

Like I mentioned before, please note that even though frame 0 shows our app fieldwire as the library, we found out from the link map that exchg_registrar::exchg_registrar() actually originated from exchangei_spork.o in libhps_sprk_exchange.a.

The version we use is 2023_SP1_U1 which should be the latest one for iOS.

Can someone please look into this and let us know how can this be fixed?

Thanks.

Hi, Wayne.

We created an issue in our Support Portal for this. We’ll be in touch.

Mike