Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incompatible with Go 1.23, which doesn't allow //go:linkname to internal symbols, including to net package #247

Closed
stefanb opened this issue Jun 25, 2024 · 1 comment

Comments

@stefanb
Copy link

stefanb commented Jun 25, 2024

While testing Go 1.23 rc1 in

there was an error:

  go: downloading github.com/tsosunchia/powclient v0.1.5
  # github.com/nxtrace/NTrace-core
  link: github.com/nxtrace/NTrace-core/trace/internal: invalid reference to net.internetSocket

Go 1.23 no longer allows //go:linkname * net.* link instructioins, see

It is used several times in this module, see:

//go:linkname internetSocket net.internetSocket
func internetSocket(ctx context.Context, net string, laddr, raddr any, sotype, proto int, mode string, ctrlCtxFn func(context.Context, string, string, syscall.RawConn) error) (fd unsafe.Pointer, err error)
//go:linkname newIPConn net.newIPConn
func newIPConn(fd unsafe.Pointer) *net.IPConn

@fakeboboliu
Copy link
Contributor

internetSocket is required to make a root-less ping on macOS, consider add -checklinkname=0 to build flags.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants