Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/compile: failed to build modernc.org/libc with internal compiler error: walkExpr: switch 1 unknown op RECOVER #47712

Closed
johejo opened this issue Aug 15, 2021 · 1 comment
Assignees
Labels
Milestone

Comments

@johejo
Copy link

@johejo johejo commented Aug 15, 2021

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

$ go version
go version devel go1.18-48dfddbab3 Sun Aug 15 02:18:46 2021 +0000 linux/amd64

Does this issue reproduce with the latest release?

No, tip only

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

go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/johejo/.cache/go-build"
GOENV="/home/johejo/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/johejo/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/johejo/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/home/johejo/ghq/github.com/golang/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/home/johejo/ghq/github.com/golang/go/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="devel go1.18-48dfddbab3 Sun Aug 15 02:18:46 2021 +0000"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/johejo/ghq/gitlab.com/cznic/libc/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-build680021489=/tmp/go-build -gno-record-gcc-switches"

What did you do?

git clone https://gitlab.com/cznic/libc.git
cd libc/
go build ./...

What did you expect to see?

Build succeds

What did you see instead?

# modernc.org/libc
walk
.   RECOVER tc(1) INTER-interface {} # libc.go:90:21 INTER-interface {}
./libc.go:90:21: internal compiler error: walkExpr: switch 1 unknown op RECOVER

goroutine 1 [running]:
runtime/debug.Stack()
        /home/johejo/ghq/github.com/golang/go/src/runtime/debug/stack.go:24 +0x65
cmd/compile/internal/base.FatalfAt({0xecefc0, 0xc0}, {0xd0277c, 0x21}, {0xc0006555f8, 0x1, 0x1})
        /home/johejo/ghq/github.com/golang/go/src/cmd/compile/internal/base/print.go:227 +0x154
cmd/compile/internal/base.Fatalf(...)
        /home/johejo/ghq/github.com/golang/go/src/cmd/compile/internal/base/print.go:196
cmd/compile/internal/walk.walkExpr1({0xe5e878, 0xc000ecefc0}, 0xc000ecefc0)
        /home/johejo/ghq/github.com/golang/go/src/cmd/compile/internal/walk/expr.go:82 +0x1136
cmd/compile/internal/walk.walkExpr({0xe5e878, 0xc000ecefc0}, 0xc000655a80)
        /home/johejo/ghq/github.com/golang/go/src/cmd/compile/internal/walk/expr.go:55 +0x428
cmd/compile/internal/walk.walkAssign(0xc000655a80, {0xe5e490, 0xc000eeac30})
        /home/johejo/ghq/github.com/golang/go/src/cmd/compile/internal/walk/assign.go:72 +0x9dc
cmd/compile/internal/walk.walkExpr1({0xe5e490, 0xc000eeac30}, 0xc000eeac30)
        /home/johejo/ghq/github.com/golang/go/src/cmd/compile/internal/walk/expr.go:179 +0x43f
cmd/compile/internal/walk.walkExpr({0xe5e490, 0xc000eeac30}, 0xc000655a80)
        /home/johejo/ghq/github.com/golang/go/src/cmd/compile/internal/walk/expr.go:55 +0x428
cmd/compile/internal/walk.walkStmt({0xe5e490, 0xc000eeac30})
        /home/johejo/ghq/github.com/golang/go/src/cmd/compile/internal/walk/stmt.go:57 +0x5da
cmd/compile/internal/walk.walkStmtList({0xc002770680, 0x3, 0xc000d1de40})
        /home/johejo/ghq/github.com/golang/go/src/cmd/compile/internal/walk/stmt.go:167 +0x5b
cmd/compile/internal/walk.Walk(0xc000d1de40)
        /home/johejo/ghq/github.com/golang/go/src/cmd/compile/internal/walk/walk.go:43 +0xef
cmd/compile/internal/gc.prepareFunc(0xc000d1de40)
        /home/johejo/ghq/github.com/golang/go/src/cmd/compile/internal/gc/compile.go:92 +0x6d
cmd/compile/internal/gc.enqueueFunc(0xc000d1de40)
        /home/johejo/ghq/github.com/golang/go/src/cmd/compile/internal/gc/compile.go:66 +0x2f7
cmd/compile/internal/gc.Main(0xd19b28)
        /home/johejo/ghq/github.com/golang/go/src/cmd/compile/internal/gc/main.go:292 +0xe5f
main.main()
        /home/johejo/ghq/github.com/golang/go/src/cmd/compile/main.go:55 +0xdd
@cuonglm cuonglm added this to the Go1.18 milestone Aug 15, 2021
@cuonglm cuonglm self-assigned this Aug 15, 2021
@gopherbot
Copy link

@gopherbot gopherbot commented Aug 15, 2021

Change https://golang.org/cl/342350 mentions this issue: cmd/compile: fix panic with dead hidden closures

Loading

@gopherbot gopherbot closed this in e61d144 Aug 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants