golang / go

The Go programming language
https://go.dev
BSD 3-Clause "New" or "Revised" License
123.59k stars 17.61k forks source link

cmd/link: wasm function size limited to 2^16 bytes [1.20 backport] #64867

Closed gopherbot closed 9 months ago

gopherbot commented 9 months ago

@mauri870 requested issue #64856 to be considered for backport to the next 1.20 minor release.

I managed to reproduce it consistently in go 1.21 now, thanks. I would not trust on my initial bisecting results because the repro was not very consistent.

I was able to reproduce the issue with:

git clone https://github.com/HarikrishnanBalagopal/move2kube.git -b feat/starlark
cd move2kube
GOOS=wasip1 GOARCH=wasm go1.21.5 build

Since 1.20 does not have the wasip1 port, I tried with GOOS=js and it compiled just fine, so it appears to not be affected.

It is unclear to me where the issue is, but since programs compile just fine in Go 1.20 and we have the same function size in 1.20, 1.21 and tip something changed between 1.20 and 1.21 that caused the error to appear.

@gopherbot please backport to Go 1.21, this is a linker issue when compiling large wasm programs without a workaround.

mauri870 commented 9 months ago

Closing this, seems like the bot picked up go 1.20 by accident.