As is documents in our known issues, EarlGrey does not work if you are using Address Sanitizer with your test app.
Some simple repro steps for this are:
Go to the FunctionalTest.xcodeproj file.
In the FunctionalTestRig Scheme, under Diagnostics, turn on Enable Address Sanitizer for both the Run and Test Options.
Now, on running the tests (CMD+U) on the FunctionalTestRig, you should get a crash from a recursive call, similar to:
Thread 1Queue : com.apple.main-thread (serial)
#0 0x000000010141b332 in bool objc::DenseMapBase<objc::DenseMap<DisguisedPtr<objc_object>, unsigned long, true, objc::DenseMapInfo<DisguisedPtr<objc_object> > >, DisguisedPtr<objc_object>, unsigned long, objc::DenseMapInfo<DisguisedPtr<objc_object> >, true>::LookupBucketFor<DisguisedPtr<objc_object> >(DisguisedPtr<objc_object> const&, std::__1::pair<DisguisedPtr<objc_object>, unsigned long> const*&) const ()
#1 0x000000010141b2fe in objc::DenseMapBase<objc::DenseMap<DisguisedPtr<objc_object>, unsigned long, true, objc::DenseMapInfo<DisguisedPtr<objc_object> > >, DisguisedPtr<objc_object>, unsigned long, objc::DenseMapInfo<DisguisedPtr<objc_object> >, true>::FindAndConstruct(DisguisedPtr<objc_object> const&) ()
#2 0x0000000101419691 in objc_object::sidetable_retain() ()
#3 0x00000001012a0c9e in grey_getIdlingResourceForQueue at EarlGrey/Synchronization/GREYDispatchQueueIdlingResource.m:61
#4 0x00000001012a022c in grey_dispatch_async at EarlGrey/Synchronization/GREYDispatchQueueIdlingResource.m:94
#5 0x000000010044b530 in wrap_dispatch_async ()
#6 0x00000001012a03df in grey_dispatch_async at EarlGrey/Synchronization/GREYDispatchQueueIdlingResource.m:98
#7 0x000000010044b530 in wrap_dispatch_async ()
#8 0x00000001012a03df in grey_dispatch_async at EarlGrey/Synchronization/GREYDispatchQueueIdlingResource.m:98
#9 0x000000010044b530 in wrap_dispatch_async ()
#10 0x00000001012a03df in grey_dispatch_async at EarlGrey/Synchronization/GREYDispatchQueueIdlingResource.m:98
#11 0x000000010044b530 in wrap_dispatch_async ()
#12 0x00000001012a03df in grey_dispatch_async at EarlGrey/Synchronization/GREYDispatchQueueIdlingResource.m:98
#13 0x000000010044b530 in wrap_dispatch_async ()
#14 0x00000001012a03df in grey_dispatch_async at EarlGrey/Synchronization/GREYDispatchQueueIdlingResource.m:98
#15 0x000000010044b530 in wrap_dispatch_async ()
#16 0x00000001012a03df in grey_dispatch_async at EarlGrey/Synchronization/GREYDispatchQueueIdlingResource.m:98
#17 0x000000010044b530 in wrap_dispatch_async ()
#18 0x00000001012a03df in grey_dispatch_async at EarlGrey/Synchronization/GREYDispatchQueueIdlingResource.m:98
#19 0x000000010044b530 in wrap_dispatch_async ()
#20 0x00000001012a03df in grey_dispatch_async at EarlGrey/Synchronization/GREYDispatchQueueIdlingResource.m:98
#21 0x000000010044b530 in wrap_dispatch_async ()
#22 0x00000001012a03df in grey_dispatch_async at EarlGrey/Synchronization/GREYDispatchQueueIdlingResource.m:98
#23 0x000000010044b530 in wrap_dispatch_async ()
#24 0x00000001012a03df in grey_dispatch_async at EarlGrey/Synchronization/GREYDispatchQueueIdlingResource.m:98
#25 0x000000010044b530 in wrap_dispatch_async ()
#26 0x00000001012a03df in grey_dispatch_async at EarlGrey/Synchronization/GREYDispatchQueueIdlingResource.m:98
#27 0x000000010044b530 in wrap_dispatch_async ()
#28 0x00000001012a03df in grey_dispatch_async at EarlGrey/Synchronization/GREYDispatchQueueIdlingResource.m:98
As is documents in our known issues, EarlGrey does not work if you are using Address Sanitizer with your test app.
Some simple repro steps for this are:
FunctionalTestRig
Scheme, under Diagnostics, turn onEnable Address Sanitizer
for both the Run and Test Options.Now, on running the tests (CMD+U) on the FunctionalTestRig, you should get a crash from a recursive call, similar to: