x86 binary crashes on M1 Pro

Number:rdar://FB9760979 Date Originated:11/15/2021
Status: Resolved:
Product: Product Version:
Classification: Reproducible:
I am using a tool that generates code for an Xcode project called R.swift. Part of the generation process involves running a compiled executable. The current version of R.swift still uses an executable compiled for x86, so it runs under Rosetta. When I try to run this on my M1 Pro, the following output appears:

rosetta error: /var/db/oah/279281325309952_279281325309952/88757c77705f5e24c858ee5b89ffc56f541b2a5d209ccfdda08f02e7605a3e61/rswift.aot: attachment of code signature supplement failed: 1
[1]    97552 trace trap  Pods/R.swift/rswift

The R.swift project is open source and available here:

The problem can be reproduced by downloading their latest release zip file (5.4.0) and trying to run the "rswift" binary on the command line.

The machine I'm using is a 2021 16" MBP with M1 Pro (10 core) and 32 GB memory.

I reproduced the crash at Mon Nov 15 10:53:02 MST 2021 and immediately started the sysdiagnose.


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!