fjl / memsize

memsize computes the size of your object graph
MIT License
27 stars 7 forks source link

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

Open stefanb opened 1 week ago

stefanb commented 1 week ago

While testing Go 1.23 rc1 in

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

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

fjl commented 1 week ago

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 commented 1 week ago

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