mirror of
https://github.com/amnezia-vpn/amneziawg-apple.git
synced 2026-10-13 21:34:11 +00:00
[PR #49] fix: keep iOS arm64 cgo off LDAPR #49
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
amnezia-vpn/amneziawg-apple#49
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/amnezia-vpn/amneziawg-apple/pull/49
Author: @flood4life
Created: 9/26/2026
Status: 🔄 Open
Base:
master← Head:fix/ios-arm64-no-ldapr📝 Commits (1)
8d37364fix: keep iOS arm64 cgo off LDAPR📊 Changes
1 file changed (+6 additions, -1 deletions)
View changed files
📝
Sources/WireGuardKitGo/Makefile(+6 -1)📄 Description
Summary
__atomic_load_n(..., __ATOMIC_CONSUME)in Go's cgo runtime toLDAPR. A10 and A11 do not implement that instruction, soAmneziaVPNNetworkExtensionSIGILLs in_cgo_wait_runtime_init_doneon the first call intolibwg-go(wgSetLogger).-mcpu=apple-a10andrcpc/lsedisabled, and setGOARM64=v8.0. macOSCGO_CFLAGSstay-archonly.Reported on the client: https://github.com/amnezia-vpn/amnezia-client/issues/2946
The client recipe downloads a tag, not
master. After this merges, it needs a tag. https://github.com/amnezia-vpn/amnezia-client/pull/3217 is blocked on that tag and will bumpawg-appleto it.Tested
Local build of this Makefile diff on Xcode 26.6 and Go 1.26.7.
masterbefore this PR was the same Makefile blob as tagv3.1.4(16cb2d58); the blob in this PR is6c9652bd.make ARCHS=arm64 PLATFORM_NAME=iphoneosproducedlibwg-go-arm64.a(41,829,664 bytes) with zero 4-byte-aligned words matching0xF8BFC000.__cgo_wait_runtime_init_done+20isldar x8, [x8](0xC8DFFD08), not the crash instructionldapr x8, [x8](0xF8BFC108).-arch arm64alone already emitsLDAR.-mcpu=apple-m1emitsldapr x8, [x8], and these flags turn that intoLDAR.make -p ARCHS="arm64 x86_64" PLATFORM_NAME=macosxexpandsCGO_ARM64_BASELINEto empty. macOSCGO_CFLAGSstay the SDK plus-arch.Not covered: an A10 iPad, and the client's
Bake-Prebuilts-iOSjob (Go 1.26.0). A clean scan does not prove the tunnel connects. If the scan is clean and the iPad still SIGILLs, check the new crash PC before changing anything else. Clang can also emitLDAPUR.Test plan
make ARCHS=arm64 PLATFORM_NAME=iphoneosand confirmlibwg-go-arm64.ahas noLDAPR Xt, [Xn]words (encoding & 0xFFFFFC00 == 0xF8BFC000)__cgo_wait_runtime_init_doneusesLDARPLATFORM_NAME=macosxleavesCGO_CFLAGSas the SDK plus-archonly🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.