Repository navigation
Closed
Labels
FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
Description
What version of Go are you using (go version)?
$ go version go version devel +2f0da6d9e2 Wed Feb 17 01:29:54 2021 +0000 linux/amd64
Does this issue reproduce with the latest release?
No.
There is no problem with go1.16.0 and go1.15.8.
What operating system and processor architecture are you using (go env)?
go env Output
$ go env GO111MODULE="" GOARCH="amd64" GOBIN="" GOCACHE="/home/heijo/.cache/go-build" GOENV="/home/heijo/.config/go/env" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOINSECURE="" GOMODCACHE="/home/heijo/go/pkg/mod" GONOPROXY="" GONOSUMDB="" GOOS="linux" GOPATH="/home/heijo/go" GOPRIVATE="" GOPROXY="https://proxy.golang.org,direct" GOROOT="/home/heijo/ghq/go.googlesource.com/go" GOSUMDB="sum.golang.org" GOTMPDIR="" GOTOOLDIR="/home/heijo/ghq/go.googlesource.com/go/pkg/tool/linux_amd64" GOVCS="" GOVERSION="devel +2f0da6d9e2 Wed Feb 17 01:29:54 2021 +0000" GCCGO="gccgo" AR="ar" CC="gcc" CXX="g++" CGO_ENABLED="1" GOMOD="/home/heijo/ghq/github.com/elastic/go-licence-detector/go.mod" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build3807889825=/tmp/go-build -gno-record-gcc-switches"
What did you do?
git clone https://github.com/elastic/go-licence-detector.git
cd go-license-detector/
go build ./...
What did you expect to see?
Build succeeds
What did you see instead?
# go.elastic.co/go-licence-detector/detector
detector/detector.go:90:81: internal compiler error: 'newClassiferFromEmbeddedDB.func2': Value live at entry. It shouldn't be. func newClassiferFromEmbeddedDB.func2, node licenseclassifier.b, value nil
goroutine 76 [running]:
runtime/debug.Stack(0xe9d600, 0xc00000e018, 0x0)
/home/heijo/ghq/go.googlesource.com/go/src/runtime/debug/stack.go:24 +0x9f
cmd/compile/internal/base.FatalfAt(0x640f000000059, 0xc002e0c8c0, 0x46, 0xc0004a0f00, 0x4, 0x4)
/home/heijo/ghq/go.googlesource.com/go/src/cmd/compile/internal/base/print.go:227 +0x1bc
cmd/compile/internal/base.Fatalf(...)
/home/heijo/ghq/go.googlesource.com/go/src/cmd/compile/internal/base/print.go:196
cmd/compile/internal/ssagen.(*ssafn).Fatalf(0xc003a14b70, 0x640f000000059, 0xd84d8e, 0x40, 0xc003a14d20, 0x3, 0x3)
/home/heijo/ghq/go.googlesource.com/go/src/cmd/compile/internal/ssagen/ssa.go:7210 +0x1a7
cmd/compile/internal/ssagen.(*state).Fatalf(...)
/home/heijo/ghq/go.googlesource.com/go/src/cmd/compile/internal/ssagen/ssa.go:845
cmd/compile/internal/ssagen.(*state).variable(0xc002e7e700, 0xeacdc0, 0xc0011bb520, 0xc00042b860, 0xc002012e40)
/home/heijo/ghq/go.googlesource.com/go/src/cmd/compile/internal/ssagen/ssa.go:6213 +0x3b5
cmd/compile/internal/ssagen.(*state).expr(0xc002e7e700, 0xeacdc0, 0xc0011bb520, 0x0)
/home/heijo/ghq/go.googlesource.com/go/src/cmd/compile/internal/ssagen/ssa.go:2297 +0x3b1f
cmd/compile/internal/ssagen.(*state).stmt(0xc002e7e700, 0xeab650, 0xc0013dcb90)
/home/heijo/ghq/go.googlesource.com/go/src/cmd/compile/internal/ssagen/ssa.go:1498 +0x2ae
cmd/compile/internal/ssagen.(*state).stmtList(0xc002e7e700, 0xc0013c0180, 0x1, 0x1)
/home/heijo/ghq/go.googlesource.com/go/src/cmd/compile/internal/ssagen/ssa.go:1269 +0x68
cmd/compile/internal/ssagen.(*state).stmt(0xc002e7e700, 0xeab8a8, 0xc0013cea00)
/home/heijo/ghq/go.googlesource.com/go/src/cmd/compile/internal/ssagen/ssa.go:1292 +0x1689
cmd/compile/internal/ssagen.(*state).stmtList(0xc002e7e700, 0xc0013cea80, 0x3, 0x4)
/home/heijo/ghq/go.googlesource.com/go/src/cmd/compile/internal/ssagen/ssa.go:1269 +0x68
cmd/compile/internal/ssagen.(*state).stmt(0xc002e7e700, 0xeab650, 0xc0011bcbe0)
/home/heijo/ghq/go.googlesource.com/go/src/cmd/compile/internal/ssagen/ssa.go:1287 +0xed
cmd/compile/internal/ssagen.(*state).stmtList(0xc002e7e700, 0xc0013d2160, 0x2, 0x2)
/home/heijo/ghq/go.googlesource.com/go/src/cmd/compile/internal/ssagen/ssa.go:1269 +0x68
cmd/compile/internal/ssagen.buildssa(0xc0011b54a0, 0x1, 0x0)
/home/heijo/ghq/go.googlesource.com/go/src/cmd/compile/internal/ssagen/ssa.go:522 +0x1145
cmd/compile/internal/ssagen.Compile(0xc0011b54a0, 0x1)
/home/heijo/ghq/go.googlesource.com/go/src/cmd/compile/internal/ssagen/pgen.go:168 +0x5d
cmd/compile/internal/gc.compileFunctions.func2.1(0xc0000aa400, 0xc0011b54a0, 0xc0003e80a0, 0xc0003f2050)
/home/heijo/ghq/go.googlesource.com/go/src/cmd/compile/internal/gc/compile.go:127 +0x65
created by cmd/compile/internal/gc.compileFunctions.func2
/home/heijo/ghq/go.googlesource.com/go/src/cmd/compile/internal/gc/compile.go:125 +0x8e
Metadata
Metadata
Assignees
Labels
FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Activity
tonyghita commentedon Feb 17, 2021
I ran into an issue with a similar message and posted the results ofgit bisecton this issue: #44325 (comment)The issue I ran into was introduced earlier than this issue.
mdempsky commentedon Feb 18, 2021
Minimizing the crash, it comes down to this function in github.com/google/licenseclassifier:
This function looks really similar to the repro case in #44325, so I'm going to close as a duplicate for now.
/cc @danscales
danscales commentedon Feb 18, 2021
I'm reopening, since #44325 contains two different issues, and this bug is representative of the second issue in the bug by rogpeppe:
=======
Here's a related example that produces a different compiler error:
From the above code I get this error:
gopherbot commentedon Feb 19, 2021
Change https://golang.org/cl/294212 mentions this issue:
cmd/compile: fix import of functions of multiple nested closurecmd/compile: fix import of functions of multiple nested closure