Skip to content

cmd/compile: panic during early deadcode while compiling #54125

@dsxack

Description

@dsxack

What version of Go are you using (go version)?

go version go1.19rc2 darwin/arm64

Does this issue reproduce with the latest release?

What operating system and processor architecture are you using (go env)?

go env Output
GO111MODULE=""
GOARCH="arm64"
GOBIN=""
GOCACHE="/Users/dmitriysmotrov/Library/Caches/go-build"
GOENV="/Users/dmitriysmotrov/Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="arm64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/dmitriysmotrov/.gvm/pkgsets/go1.19rc2/global/pkg/mod"
GONOPROXY="git.omprussia.ru"
GONOSUMDB="git.omprussia.ru"
GOOS="darwin"
GOPATH="/Users/dmitriysmotrov/.gvm/pkgsets/go1.19rc2/global"
GOPRIVATE="git.omprussia.ru"
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/Users/dmitriysmotrov/.gvm/gos/go1.19rc2"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/Users/dmitriysmotrov/.gvm/gos/go1.19rc2/pkg/tool/darwin_arm64"
GOVCS=""
GOVERSION="go1.19rc2"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/dev/null"
GOWORK=""
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/z5/8ts06jv92yjc5sp5mdsdzr2h0000gn/T/go-build592114221=/tmp/go-build -gno-record-gcc-switches -fno-common

What did you do?

go install github.com/gopasspw/gopass@latest

What did you expect to see?

program is installed without errors

What did you see instead?

# github.com/hashicorp/errwrap
.gvm/pkgsets/go1.19rc2/global/pkg/mod/github.com/hashicorp/errwrap@v1.1.0/errwrap.go:72:35: internal compiler error: 'ContainsType': panic during early deadcode while compiling ContainsType:

runtime error: invalid memory address or nil pointer dereference

goroutine 16 [running]:
cmd/compile/internal/ssa.Compile.func1()
	/Users/dmitriysmotrov/.gvm/gos/go1.19rc2/src/cmd/compile/internal/ssa/compile.go:50 +0x6c
panic({0x104aceee0, 0x104fcba50})
	/Users/dmitriysmotrov/.gvm/gos/go1.19rc2/src/runtime/panic.go:884 +0x204
cmd/compile/internal/ssa.deadcode(0x140002fcfc0)
	/Users/dmitriysmotrov/.gvm/gos/go1.19rc2/src/cmd/compile/internal/ssa/deadcode.go:273 +0x6c4
cmd/compile/internal/ssa.Compile(0x140002fcfc0)
	/Users/dmitriysmotrov/.gvm/gos/go1.19rc2/src/cmd/compile/internal/ssa/compile.go:98 +0x8e8
cmd/compile/internal/ssagen.buildssa(0x140005363c0, 0x3)
	/Users/dmitriysmotrov/.gvm/gos/go1.19rc2/src/cmd/compile/internal/ssagen/ssa.go:574 +0x1c50
cmd/compile/internal/ssagen.Compile(0x140005363c0, 0x1048d4dd4?)
	/Users/dmitriysmotrov/.gvm/gos/go1.19rc2/src/cmd/compile/internal/ssagen/pgen.go:183 +0x30
cmd/compile/internal/gc.compileFunctions.func4.1(0x0?)
	/Users/dmitriysmotrov/.gvm/gos/go1.19rc2/src/cmd/compile/internal/gc/compile.go:153 +0x3c
cmd/compile/internal/gc.compileFunctions.func3.1()
	/Users/dmitriysmotrov/.gvm/gos/go1.19rc2/src/cmd/compile/internal/gc/compile.go:140 +0x48
created by cmd/compile/internal/gc.compileFunctions.func3
	/Users/dmitriysmotrov/.gvm/gos/go1.19rc2/src/cmd/compile/internal/gc/compile.go:138 +0x7c



Please file a bug report including a short program that triggers the error.
https://go.dev/issue/new

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeWaitingForInfoIssue is not actionable because of missing required information, which needs to be provided.compiler/runtimeIssues related to the Go compiler and/or runtime.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions