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: internal compiler error: panic: unification reached recursion depth limit #57800

Closed
icholy opened this issue Jan 14, 2023 · 1 comment
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. FrozenDueToAge

Comments

@icholy
Copy link

icholy commented Jan 14, 2023

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

$ go version
go version go1.19.5 linux/amd64

Does this issue reproduce with the latest release?

Yes.

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

go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/icholy/.cache/go-build"
GOENV="/home/icholy/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/icholy/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/icholy/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.19.5"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/icholy/src/github.com/icholy/exp/go.mod"
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 -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build590854279=/tmp/go-build -gno-record-gcc-switches"
GOROOT/bin/go version: go version go1.19.5 linux/amd64
GOROOT/bin/go tool compile -V: compile version go1.19.5
uname -sr: Linux 5.15.0-58-generic
Distributor ID:	Ubuntu
Description:	Ubuntu 20.04.5 LTS
Release:	20.04
Codename:	focal
/lib/x86_64-linux-gnu/libc.so.6: GNU C Library (Ubuntu GLIBC 2.31-0ubuntu9.9) stable release version 2.31.
lldb --version: lldb version 10.0.0 (git@github.com:apple/llvm-project.git revision c315411fac10439aa7a09dce976b5716af9f149c)
Swift version 5.5.2 (swift-5.5.2-RELEASE)
gdb --version: GNU gdb (Ubuntu 9.2-0ubuntu1~20.04.1) 9.2

What did you do?

package main

func A[T any, C ~chan T](chans []C) {
	for _, b := range B(chans) {
		go func() {
			A(b)
		}()
	}
}

func B[T any](s []T) [][]T {
	return nil
}

https://go.dev/play/p/1PHqJVMq1ny

What did you expect to see?

No internal compiler error.

What did you see instead?

<unknown line number>: internal compiler error: panic: unification reached recursion depth limit

Please file a bug report including a short program that triggers the error.
https://go.dev/issue/new
@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Jan 14, 2023
@seankhliao
Copy link
Member

fixed on 1.20 / tip

@golang golang locked and limited conversation to collaborators Jan 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. FrozenDueToAge
Projects
None yet
Development

No branches or pull requests

3 participants