memsize icon indicating copy to clipboard operation
memsize copied to clipboard

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

Open stefanb opened this issue 1 year ago • 2 comments

While testing Go 1.23 rc1 in

  • https://github.com/Homebrew/homebrew-core/pull/175310

there was an error:

  # github.com/ethereum/go-ethereum/cmd/abigen
  link: github.com/fjl/memsize: invalid reference to runtime.stopTheWorld
  util.go:47: exit status 1

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

  • https://tip.golang.org/doc/go1.23#linker
  • https://github.com/golang/go/issues/67401

It is used several times in this module, see: https://github.com/search?q=repo%3Afjl%2Fmemsize%20linkname&type=code

stefanb avatar Jun 25 '24 07:06 stefanb

Crap. So I guess this means this module can't work anymore, or at least not in the way it used to. We need to stop all goroutines in order to traverse registered root pointers without racing with the program.

fjl avatar Jun 25 '24 11:06 fjl

I have created the above proposal asking the Go developers to consider this module.

fjl avatar Jun 25 '24 11:06 fjl