Open
Description
What version of Go are you using (go version
)?
$ go version go version go1.16.2 darwin/arm64
Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (go env
)?
macOS Big Sur 11.2.2
go env
Output
$ go env GO111MODULE="" GOARCH="arm64" GOBIN="" GOCACHE="/Users/bart/Library/Caches/go-build" GOENV="/Users/bart/Library/Application Support/go/env" GOEXE="" GOFLAGS="" GOHOSTARCH="arm64" GOHOSTOS="darwin" GOINSECURE="" GOMODCACHE="/Users/bart/go/pkg/mod" GONOPROXY="" GONOSUMDB="" GOOS="darwin" GOPATH="/Users/bart/go" GOPRIVATE="" GOPROXY="https://proxy.golang.org,direct" GOROOT="/usr/local/go" GOSUMDB="sum.golang.org" GOTMPDIR="" GOTOOLDIR="/usr/local/go/pkg/tool/darwin_arm64" GOVCS="" GOVERSION="go1.16.2" GCCGO="gccgo" AR="ar" CC="clang" CXX="clang++" CGO_ENABLED="1" GOMOD="/dev/null" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/qc/mhy1mvh13w993fhyg5xmb_880000gn/T/go-build915245815=/tmp/go-build -gno-record-gcc-switches -fno-common"
What did you do?
$ cat << EOF > test.go
package main
import "fmt"
func main() {
fmt.Println("Hello, World")
}
EOF
$ export GODEBUG=efence=1
$ go build test.go
# command-line-arguments
unexpected fault address 0x14000d235c8
fatal error: fault
[signal SIGBUS: bus error code=0x1 addr=0x14000d235c8 pc=0x100e49b94]
goroutine 1 [running]:
runtime.throw(0x100f64a2a, 0x5)
/usr/local/go/src/runtime/panic.go:1117 +0x54 fp=0x1014f2640 sp=0x1014f2610 pc=0x100d7e824
runtime.sigpanic()
/usr/local/go/src/runtime/signal_unix.go:731 +0x284 fp=0x1014f2680 sp=0x1014f2640 pc=0x100d96044
cmd/link/internal/loader.(*Loader).SymName(0x1400060a000, 0xf125, 0xf484, 0x38)
/usr/local/go/src/cmd/link/internal/loader/loader.go:756 +0x144 fp=0x1014f26f0 sp=0x1014f2690 pc=0x100e49b94
cmd/link/internal/ld.(*dwctxt).nameFromDIESym(...)
/usr/local/go/src/cmd/link/internal/ld/dwarf.go:737
cmd/link/internal/ld.(*dwctxt).synthesizemaptypes(0x1014f2b10, 0x140000f2000, 0x1400104f980)
/usr/local/go/src/cmd/link/internal/ld/dwarf.go:912 +0x3a8 fp=0x1014f28e0 sp=0x1014f26f0 pc=0x100ebc088
cmd/link/internal/ld.dwarfGenerateDebugInfo(0x140000f2000)
/usr/local/go/src/cmd/link/internal/ld/dwarf.go:1950 +0x127c fp=0x1014f2cb0 sp=0x1014f28e0 pc=0x100ec390c
cmd/link/internal/ld.Main(0x10117b500, 0x10, 0x20, 0x1, 0x1f, 0x1e, 0x100f6c384, 0x14, 0x100f6f9a9, 0x1a, ...)
/usr/local/go/src/cmd/link/internal/ld/main.go:260 +0xd48 fp=0x1014f2f10 sp=0x1014f2cb0 pc=0x100ef3438
main.main()
/usr/local/go/src/cmd/link/main.go:68 +0x1bc fp=0x1014f3f70 sp=0x1014f2f10 pc=0x100f6324c
runtime.main()
/usr/local/go/src/runtime/proc.go:225 +0x26c fp=0x1014f3fd0 sp=0x1014f3f70 pc=0x100d80ccc
runtime.goexit()
/usr/local/go/src/runtime/asm_arm64.s:1130 +0x4 fp=0x1014f3fd0 sp=0x1014f3fd0 pc=0x100db1c14
What did you expect to see?
Silent, successful build.
What did you see instead?
Compiler stack trace as shown above.
Metadata
Metadata
Assignees
Labels
Type
Projects
Relationships
Development
No branches or pull requests
Activity
[-]`GODEBUG=efence=1` causes panic during build on M1[/-][+]GODEBUG=efence=1 causes panic during build on M1[/+][-]GODEBUG=efence=1 causes panic during build on M1[/-][+]cmd/link: GODEBUG=efence=1 causes panic during build on M1[/+][-]cmd/link: GODEBUG=efence=1 causes panic during build on M1[/-][+]runtime: GODEBUG=efence=1 causes panic during build on M1[/+]lld
link in linux/arm64 #69466fatal error: getWeakHandle on invalid pointer
withsbrk=1
#69729