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

*: remove instances of go:linkname throughout #3849

Open
jbowens opened this issue Aug 13, 2024 · 2 comments
Open

*: remove instances of go:linkname throughout #3849

jbowens opened this issue Aug 13, 2024 · 2 comments

Comments

@jbowens
Copy link
Collaborator

jbowens commented Aug 13, 2024

With Go 1.23, the Go linker is much more restrictive about uses of go:linkname and will specifically disallow linking to internal standard library symbols (golang/go#67401). For now it seems we are safe to upgrade to Go 1.23 as they have surveyed major open-source repositories including cockroach to find instances of go:linkname and allow-listed already-linkname'd symbols. However, things are liable to change in the future and symbols may be removed from the allow-list.

See cockroachdb/cockroach#128922.

internal/fastrand/fastrand.go://go:linkname Uint32 runtime.fastrand
internal/fastrand/fastrand.go://go:linkname Uint32n runtime.fastrandn
internal/manual/manual.go://go:linkname throw runtime.throw
internal/rawalloc/rawalloc_go1.9.go://go:linkname mallocgc runtime.mallocgc
sstable/colblk/base.go://go:linkname memmove runtime.memmove
sstable/colblk/base.go://go:linkname mallocgc runtime.mallocgc

Jira issue: PEBBLE-241

@pkieltyka
Copy link

hi all, I noticed this was moved to backlog, but doesn’t this prevent use of go 1.23 with pebble?

@jbowens
Copy link
Collaborator Author

jbowens commented Sep 26, 2024

My understanding is that for the go 1.23 release, all existing open-source usages (like ours) are permitted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Backlog
Development

No branches or pull requests

2 participants