This document summarizes the portability issues with the current code base in respect to porting to Apple Silicon. Note, our Xcode will only build for macOS, not iOS/tvOS/watchOS.
The prologues for the assembly of egg.s was out of date. To get a proper modern prologue, we obtain it with the scaffold.c
file.
Product > Perform Action > Assemble
scaffold.c
No changes needed.
I checked and this works correctly - it has a retain cycle caught by memory logging via Malloc Stack.
We properly get address sanitizer picking up OvershootAllocated. We see the 0xAA scribble with Malloc Scribble enabled.
No changes needed.
No changes needed.
No changes needed.
This has multiple targets, icdab_sema_{mac, ios}
. The mac variant compiles ok on the main Xcode 12.0 beta (12A8158a). It runs ok on Apple Silicon.
No changes needed. But this app comes in two flavours, iOS and macOS so needs to be tested on Apple Silicon.
I have migrated this to OS X running ARM64. I used TargetConditionals.h Unfortunately, we can no longer
thread_set_state
from another process so we don't get the kind of crash dump we are looking for. Our goal
is to get the crash dump to report that the number of calls to thread_set_state
was non-zero from other processes.
Luckily we have historical data to show the statistic. If we figure out a way forwards, we'll revisit this.
No changes needed.
Write an example program that calls a function implemented with fixed arguments, with variadic arguments on the call site, and show it crashing on ARM; see Addressing Architectural Differences
I did not do this because it is in fact related to the more realistic use case below.
Write an example program that unsafely is transformed to variadic by objc_msgSend
; see Addressing Architectural Differences
I wrote the app but could not cause it to crash via the realistic use case of objective c message runtime calling.
Since 1024 cast to BOOL is false on x86 but true on arm64 write some code which leads to a logic crash; see Addressing Architectural Differences
I can't think of a realistic use case that crashes with this portability issue.
Write a simple program that places assembly code in a data array and then jumps into it. This simulates writing a JIT compiler. The aim is to trigger execute on readonly data segments; see Porting JIT on Apple Silicon
There is an interesting tutorial on JIT; https://github.com/spencertipping/jit-tutorial
I studied JIT and found a more interesting case of Failed Crashes as a result of the analysis.