-
Notifications
You must be signed in to change notification settings - Fork 19k
cmd/compile: program compiles to wasm but is invalid: go:wasmexport: integer too large #73246
Copy link
Copy link
Closed
Labels
BugReportIssues describing a possible bug in the Go implementation.Issues describing a possible bug in the Go implementation.CriticalA critical problem that affects the availability or correctness of production systems built using GoA critical problem that affects the availability or correctness of production systems built using GoFixPendingIssues that have a fix which has not yet been reviewed or submitted.Issues that have a fix which has not yet been reviewed or submitted.FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.arch-wasmWebAssembly issuesWebAssembly issuescompiler/runtimeIssues related to the Go compiler and/or runtime.Issues related to the Go compiler and/or runtime.
Milestone
Metadata
Metadata
Assignees
Labels
BugReportIssues describing a possible bug in the Go implementation.Issues describing a possible bug in the Go implementation.CriticalA critical problem that affects the availability or correctness of production systems built using GoA critical problem that affects the availability or correctness of production systems built using GoFixPendingIssues that have a fix which has not yet been reviewed or submitted.Issues that have a fix which has not yet been reviewed or submitted.FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.arch-wasmWebAssembly issuesWebAssembly issuescompiler/runtimeIssues related to the Go compiler and/or runtime.Issues related to the Go compiler and/or runtime.
Type
Projects
Status
Done
Go version
go1.24.2 darwin/arm64
Output of
go envin your module/workspace:What did you do?
I compiled a program to wasm using
GOOS=wasip1 GOARCH=wasmand when I tried to execute it with wazero and wasmtime found that the program was invalid.I have managed to create a minimal reproduction.
Create a new directory and run the following script.
(It seems to only fail if I import the external-secret project and use a wasm export in combination)
What did you see happen?
Both wazero and wasmtime fail to compile the wasm binary produced by the above program.
Wazero:
Wasmtime:
What did you expect to see?
Binary produced by Go Toolchain compiles successfully and can be executed successfully.