9a68dcd7de
This (1) "just makes sense" and (2) avoids a weird bug in some name-dependent calling conventions in wasm code generation, when the local pkg has a real name instead of "". The calling conventions are triggered for a "wrapper" function, and somehow an abiwrapper was taken to be a "wrapper" function, resulting in the use of an invalid register. But abiwrapping has no business being in js/wasm code generation, so just turn that off. Updates #51734. For posterity, that crash is: GOSSAFUNC=wasmTruncU GOMAXPROCS=1 \ GOOS=js GOARCH=wasm GOEXPERIMENT=regabi,regabiargs /Users/drchase/work/go-quick/bin/go build \ -gcflags=all=-d=abiwrap -o a.exe \ GOROOT/test/abi/bad_select_crash.go <autogenerated>:1: internal compiler error: panic: bad Get: invalid register goroutine 1 [running]: runtime/debug.Stack() runtime/debug/stack.go:24 +0x65 cmd/compile/internal/base.FatalfAt({0xc80?, 0x0?}, {0x195c85e, 0x9}, {0xc005ef72c8, 0x1, 0x1}) /Users/drchase/work/go-quick/src/cmd/compile/internal/base/print.go:227 +0x1d7 cmd/compile/internal/base.Fatalf(...) /Users/drchase/work/go-quick/src/cmd/compile/internal/base/print.go:196 cmd/compile/internal/gc.handlePanic() /Users/drchase/work/go-quick/src/cmd/compile/internal/gc/main.go:48 +0x85 panic({0x18bf3c0, 0x1ad0430}) runtime/panic.go:854 +0x26d cmd/internal/obj/wasm.assemble(0xc0000f8200, 0xc001c74880, 0x0?) /Users/drchase/work/go-quick/src/cmd/internal/obj/wasm/wasmobj.go:920 +0x1958 cmd/internal/obj.Flushplist(0xc0000f8200, 0xc005ef79a8, 0xc0022264c0, {0x7ff7bfefdd17, 0x7}) /Users/drchase/work/go-quick/src/cmd/internal/obj/plist.go:151 +0x784 cmd/compile/internal/objw.(*Progs).Flush(...) /Users/drchase/work/go-quick/src/cmd/compile/internal/objw/prog.go:124 cmd/compile/internal/ssagen.Compile(0xc000707e00, 0xc001b4d620?) /Users/drchase/work/go-quick/src/cmd/compile/internal/ssagen/pgen.go:208 +0x495 cmd/compile/internal/gc.compileFunctions.func4.1(0xc005ef7a01?) /Users/drchase/work/go-quick/src/cmd/compile/internal/gc/compile.go:153 +0x3a cmd/compile/internal/gc.compileFunctions.func2(0x0?) /Users/drchase/work/go-quick/src/cmd/compile/internal/gc/compile.go:125 +0x1e cmd/compile/internal/gc.compileFunctions.func4({0xc004685000, 0x79f, 0xa00?}) /Users/drchase/work/go-quick/src/cmd/compile/internal/gc/compile.go:152 +0x53 cmd/compile/internal/gc.compileFunctions() /Users/drchase/work/go-quick/src/cmd/compile/internal/gc/compile.go:163 +0x162 cmd/compile/internal/gc.Main(0x198d3d8) /Users/drchase/work/go-quick/src/cmd/compile/internal/gc/main.go:297 +0x108a main.main() /Users/drchase/work/go-quick/src/cmd/compile/main.go:55 +0xdd Change-Id: I79f039e2494f78efba60e52ab1110d62656fb7ef Reviewed-on: https://go-review.googlesource.com/c/go/+/405899 Run-TryBot: David Chase <drchase@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com> |
||
---|---|---|
.github | ||
api | ||
doc | ||
lib/time | ||
misc | ||
src | ||
test | ||
.gitattributes | ||
.gitignore | ||
AUTHORS | ||
codereview.cfg | ||
CONTRIBUTING.md | ||
CONTRIBUTORS | ||
LICENSE | ||
PATENTS | ||
README.md | ||
SECURITY.md |
The Go Programming Language
Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
Gopher image by Renee French, licensed under Creative Commons 3.0 Attributions license.
Our canonical Git repository is located at https://go.googlesource.com/go. There is a mirror of the repository at https://github.com/golang/go.
Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file.
Download and Install
Binary Distributions
Official binary distributions are available at https://go.dev/dl/.
After downloading a binary release, visit https://go.dev/doc/install for installation instructions.
Install From Source
If a binary distribution is not available for your combination of operating system and architecture, visit https://go.dev/doc/install/source for source installation instructions.
Contributing
Go is the work of thousands of contributors. We appreciate your help!
To contribute, please read the contribution guidelines at https://go.dev/doc/contribute.
Note that the Go project uses the issue tracker for bug reports and proposals only. See https://go.dev/wiki/Questions for a list of places to ask questions about the Go language.