CoreLocation broken (crashes) on 32-bit High Sierra Beta 3

Originator:chris.hamons
Number:rdar://33270321 Date Originated:July 12 2017
Status:Closed Resolved:
Product: Product Version:10.13 Beta (17A306f)
Classification:Crash Reproducible:
 
Summary:
CoreLocation depends on a private framework GeoServices which invoke initCNPostalAddressStreetKey at static initializer time even in 32-bit, but Contacts which I assume it is setting up is 64-bit only. It

See the steps to reproduce, as a trivial use of CoreLocation in 32-bit applications is broken.

This also happens to break every single Xamarin.Mac 32-bit application.

This worked in Beta 2, so it appears to have been introduced in Beta 3.

Steps to Reproduce:
Create a new Cocoa Application in Xcode
Set it to 32-bit
Add the following code:

CLLocationManager * mgr = [[CLLocationManager alloc] init];

Run.

You will crash with a stack like this:

* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
  * frame #0: 0xa3884182 GeoServices`initCNPostalAddressStreetKey() + 47
    frame #1: 0xa3911a8c GeoServices`_GLOBAL__sub_I_GEOAddressObject.mm + 54
    frame #2: 0x0001f502 dyld`___ZN16ImageLoaderMachO18doModInitFunctionsERKN11ImageLoader11LinkContextE_block_invoke + 34
    frame #3: 0x000091ed dyld`dyld3::kdebug_trace_dyld_duration(unsigned int, unsigned long long, unsigned long long, void () block_pointer) + 210
    frame #4: 0x0001f450 dyld`ImageLoaderMachO::doModInitFunctions(ImageLoader::LinkContext const&) + 422
    frame #5: 0x0001f659 dyld`ImageLoaderMachO::doInitialization(ImageLoader::LinkContext const&) + 59
    frame #6: 0x0001a4e8 dyld`ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, char const*, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 350
    frame #7: 0x0001a472 dyld`ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, char const*, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 232
    frame #8: 0x0001a472 dyld`ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, char const*, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 232
    frame #9: 0x000194b8 dyld`ImageLoader::processInitializers(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 104
    frame #10: 0x0001953b dyld`ImageLoader::runInitializers(ImageLoader::LinkContext const&, ImageLoader::InitializerTimingList&) + 65
    frame #11: 0x0000a45f dyld`dyld::initializeMainExecutable() + 199
    frame #12: 0x0000f537 dyld`dyld::_main(macho_header const*, unsigned long, int, char const**, char const**, char const**, unsigned long*) + 7756
    frame #13: 0x000093f7 dyld`dyldbootstrap::start(macho_header const*, int, char const**, long, macho_header const*, unsigned long*) + 374
    frame #14: 0x00009247 dyld`_dyld_start + 71

Expected Results:
CoreLocation not crash on the simplest use case.

Observed Results:
Crashes 100% of the time

Version:
10.13 Beta (17A306f)   (Beta 3)

Comments

This was fixed in the latest beta.

By chris.hamons at July 31, 2017, 7:08 p.m. (reply...)

Duplicated at http://www.openradar.me/radar?id=5011396781670400

http://www.openradar.me/radar?id=5011396781670400


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!