Skip to content

syscall: the wrong sysctl was gimped on iOS #35101

@zx2c4

Description

@zx2c4

In issue #34133, @mmaxim reported that the app store was rejecting his app due to the use of __sysctl, which he blamed on the Go runtime. Others didn't seem to have the problem, but @mmaxim said that things were accepted by the app store if he went back to Go 1.10. @eliasnaur considered this to be confirmation of the problem and removed sysctl on iOS from Go 1.14 and backported that to Go 1.13.3.

Unfortunately the diagnosis was incorrect. __sysctl is undocumented, but sysctl is documented. The Go runtime uses sysctl. However, x/sys/unix uses __sysctl. @mmaxim noticed that Go 1.10 worked for him, because going back that far switched his vendored x/sys/unix over to using raw syscalls instead of going through libSystem.

This is a regression, breaking wireguard-apple's use of net.InterfaceByName, which uses sysctl under the hood.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.OS-DarwinmobileAndroid, iOS, and x/mobile

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions