facebook/xctool — pull request #149 by LegNeato (2013-09-10 05:32:50+00:00)
Title: Prevent a crash (EXC_BAD_ACCESS)on 10.7 and Xcode 4

This is the crash I was getting. Removing the copy makes it go away, matching
__write_nocancel above

Process: otest [46217]
Path: /Applications/Xcode.app/Contents/Developer/Tools/otest
Identifier: otest
Version: ??? (???)
Code Type: X86-64 (Native)
Parent Process: xctool [46151]

Date/Time: 2013-09-09 22:17:02.355 -0700
OS Version: Mac OS X 10.7.5 (11G63)
Report Version: 9

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

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

VM Regions Near 0:
-->
__TEXT 000000010b43a000-000000010b43e000 [ 16K] r-x/rwx SM=COW /Applications/Xcode.app/Contents/Developer/Tools/otest

Application Specific Information:
objc_msgSend() selector name: copy

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libobjc.A.dylib 0x00007fff84ac1e96 objc_msgSend + 22
1 otest-shim-osx.dylib 0x000000010b446208 __write + 116 (otest-shim.m:277)
2 libobjc.A.dylib 0x00007fff84ace71c _objc_syslog + 60
3 libobjc.A.dylib 0x00007fff84ace95f _objc_inform + 181
4 libobjc.A.dylib 0x00007fff84aba974 map_images_nolock + 750
5 libobjc.A.dylib 0x00007fff84aba622 map_images + 115
6 dyld 0x00007fff6b03f3dd _ZN4dyldL18notifyBatchPartialE17dyld_image_statesbPFPKcS0_jPK15dyld_image_infoE + 964
7 dyld 0x00007fff6b03f50b dyld::registerImageStateBatchChangeHandler(dyld_image_states, char const* (*)(dyld_image_states, unsigned int, dyld_image_info const*)) + 180
8 libdyld.dylib 0x00007fff8b444acc dyld_register_image_state_change_handler + 81
9 libobjc.A.dylib 0x00007fff84ab903a _objc_init + 58
10 dyld 0x00007fff6b049da6 ImageLoaderMachO::doModInitFunctions(ImageLoader::LinkContext const&) + 218
11 dyld 0x00007fff6b049af2 ImageLoaderMachO::doInitialization(ImageLoader::LinkContext const&) + 46