Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bootstraponline/611015b2f580c5b09e9c to your computer and use it in GitHub Desktop.
Save bootstraponline/611015b2f580c5b09e9c to your computer and use it in GitHub Desktop.
deny-mmap for DYLD_INSERT_LIBRARIES on Simulator Process

It looks like the Simulator.app binary is now signed as of Xcode 7 as the following occurs in instruments-without-delay when using the build script:

./build.sh test <SIMULATOR-UDID>

The message that we get from the kernel is: 7/23/15 12:22:52.000 PM kernel[0]: AMFI: Simulator(pid 72600) - [deny-mmap] mapped file has no team identifier and is not a platform binary: /Users/lawrencelomax/src/instruments-without-delay/build/SimShim.dylib

This causes a crash:

Process:               Simulator [72600]
Path:                  /Applications/Xcode-beta.app/Contents/Developer/Applications/Simulator.app/Contents/MacOS/Simulator
Identifier:            com.apple.iphonesimulator
Version:               9.0 (612)
Build Info:            Indigo-612000000000000~35
Code Type:             X86-64 (Native)
Parent Process:        ??? [1]
Responsible:           Simulator [72600]
User ID:               1258250853

Date/Time:             2015-07-23 12:22:52.151 +0100
OS Version:            Mac OS X 10.10.4 (14E46)
Report Version:        11
Anonymous UUID:        866B08FD-7EC7-46CF-3F0C-F6CC9ACE7E1B

Sleep/Wake UUID:       0B0BF0F2-3C40-4E5E-BB88-D00229D58AD8

Time Awake Since Boot: 250000 seconds
Time Since Wake:       9500 seconds

Crashed Thread:        0

Exception Type:        EXC_BREAKPOINT (SIGTRAP)
Exception Codes:       0x0000000000000002, 0x0000000000000000

Application Specific Information:
dyld: launch, loading dependent libraries
DYLD_INSERT_LIBRARIES=/Users/lawrencelomax/src/instruments-without-delay/build/SimShim.dylib

Dyld Error Message:
  could not load inserted library '/Users/lawrencelomax/src/instruments-without-delay/build/SimShim.dylib' because no suitable image found.  Did find:
	/Users/lawrencelomax/src/instruments-without-delay/build/SimShim.dylib: mmap() error 1 at address=0x10B21E000, size=0x00001000 segment=__TEXT in Segment::map() mapping /Users/lawrencelomax/src/instruments-without-delay/build/SimShim.dylib

Binary Images:
       0x10b1db000 -        0x10b203ff7  com.apple.iphonesimulator (9.0 - 612) <F7A8C666-2391-3803-A6E8-E9B4CFB9791C> /Applications/Xcode-beta.app/Contents/Developer/Applications/Simulator.app/Contents/MacOS/Simulator
    0x7fff69e40000 -     0x7fff69e76837  dyld (353.2.1) <72A99D0F-0B56-3938-ABC5-67A0F33757C4> /usr/lib/dyld

Model: MacBookPro11,2, BootROM MBP112.0138.B15, 4 processors, Intel Core i7, 2.6 GHz, 16 GB, SMC 2.18f15
Graphics: Intel Iris Pro, Intel Iris Pro, Built-In
Memory Module: BANK 0/DIMM0, 8 GB, DDR3, 1600 MHz, 0x80AD, 0x484D54343147533641465238412D50422020
Memory Module: BANK 1/DIMM0, 8 GB, DDR3, 1600 MHz, 0x80AD, 0x484D54343147533641465238412D50422020
AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x134), Broadcom BCM43xx 1.0 (7.15.166.24.3)
Bluetooth: Version 4.3.5f8 15969, 3 services, 27 devices, 1 incoming serial ports
Network Service: Display Ethernet, Ethernet, en6
PCI Card: pci11c1,5901, IEEE 1394 Open HCI, Thunderbolt@190,0,0
PCI Card: Apple 57761-B0, Ethernet Controller, Thunderbolt@191,0,0
PCI Card: pci12d8,400e, USB Open Host Controller, Thunderbolt@196,0,0
PCI Card: pci12d8,400e, USB Open Host Controller, Thunderbolt@196,0,1
PCI Card: pci12d8,400f, USB Enhanced Host Controller, Thunderbolt@196,0,2
Serial ATA Device: APPLE SSD SM0256F, 251 GB
USB Device: Internal Memory Card Reader
USB Device: BRCM20702 Hub
USB Device: Bluetooth USB Host Controller
USB Device: Apple Internal Keyboard / Trackpad
USB Device: Keyboard Hub
USB Device: Apple Keyboard
USB Device: Hub
USB Device: Apple Thunderbolt Display
USB Device: FaceTime HD Camera (Display)
USB Device: Display Audio
Thunderbolt Bus: MacBook Pro, Apple Inc., 17.1
Thunderbolt Device: Thunderbolt Display, Apple Inc., 1, 26.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment