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

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

Closed
gopherbot opened this issue Dec 26, 2023 · 1 comment
Closed

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

gopherbot opened this issue Dec 26, 2023 · 1 comment
Labels
CherryPickCandidate Used during the release process for point releases compiler/runtime Issues related to the Go compiler and/or runtime.
Milestone

Comments

@gopherbot
Copy link

@mauri870 requested issue #64856 to be considered for backport to the next 1.21 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.

@gopherbot gopherbot added the CherryPickCandidate Used during the release process for point releases label Dec 26, 2023
@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Dec 26, 2023
@gopherbot gopherbot added this to the Go1.21.6 milestone Dec 26, 2023
@gopherbot gopherbot modified the milestones: Go1.21.6, Go1.21.7 Jan 9, 2024
@gopherbot gopherbot modified the milestones: Go1.21.7, Go1.21.8 Feb 6, 2024
@prattmic
Copy link
Member

In our backport review meeting today, we don't think that this qualifies for a backport at this time because the fix is fairly complex (higher risk) and the underlying issue here is not really a regression. This port always had a 2^16 byte limit. For applications right on the edge of this limit, 1.22 did regress because std got slightly larger, but if the application code had gotten slightly larger it would have encountered the same issue. This should still be fixed for 1.23, of course.

@prattmic prattmic closed this as not planned Won't fix, can't repro, duplicate, stale Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CherryPickCandidate Used during the release process for point releases compiler/runtime Issues related to the Go compiler and/or runtime.
Projects
None yet
Development

No branches or pull requests

2 participants