]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: correct wasmexport result type checking
authorCherry Mui <cherryyz@google.com>
Thu, 5 Sep 2024 22:56:26 +0000 (18:56 -0400)
committerCherry Mui <cherryyz@google.com>
Wed, 11 Sep 2024 20:01:21 +0000 (20:01 +0000)
commiteb975601a07ad25a47fdcb0cc6166ec695973d3e
tree662dce81535d3ad8467d03aac7203426b64d7f0b
parent69827b5c8ddf93be65bfc8b17d331bb3ff7b704c
cmd/compile: correct wasmexport result type checking

The function resultsToWasmFields was originally for only
wasmimport. I adopted it for wasmexport as well, but forgot to
update a few places that were wasmimport-specific. This leads to
compiler panic if an invalid result type is passed, and also
unsafe.Pointer not actually supported. This CL fixes it.

Updates #65199.

Change-Id: I9bbd7154b70422504994840ff541c39ee596ee8f
Reviewed-on: https://go-review.googlesource.com/c/go/+/611315
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Achille Roussel <achille.roussel@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
src/cmd/compile/internal/ssagen/abi.go
test/wasmexport2.go