Skip to content

x/sys/unix: PR_SET_PTRACER_ANY missing for linux_arm conditional compilation #16682

@nvb

Description

@nvb

The PR_SET_PTRACER_ANY system error number is missing from the // +build arm,linux version of zerror_${GOOS}_${GOARCH}.go, but is available for all other linux builds. This results in the compilation of code like https://github.com/backtrace-labs/go-bcd/blob/master/bcd_sys_linux.go to fail on 32-bit arm architectures.

I haven't been able to find any reason why this flag would be missing, so I'm curious if the correct approach would be to add something like:

#ifndef PR_SET_PTRACER_ANY
#define PR_SET_PTRACER_ANY  -0x1
#endif

directly after the other default error codes in the mkerrors.sh generation script.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions