Skip to content

cmd/compile: compiler crash on too large channel type #52767

@ddaa2000

Description

@ddaa2000

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

$ go version
go version go1.17.9 windows/amd64

Does this issue reproduce with the latest release?

Latest release in go1.17.9, but not in go1.18.1

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

go env Output
$ go env
set GO111MODULE=
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\ddaa\AppData\Local\go-build
set GOENV=C:\Users\ddaa\AppData\Roaming\go\env
set GOEXE=.exe
set GOEXPERIMENT=
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=C:\Users\ddaa\go\pkg\mod
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=C:\Users\ddaa\go
set GOPRIVATE=
set GOPROXY=https://goproxy.cn,direct
set GOROOT=C:\Users\ddaa\sdk\go1.17.9
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=C:\Users\ddaa\sdk\go1.17.9\pkg\tool\windows_amd64
set GOVCS=
set GOVERSION=go1.17.9
set GCCGO=gccgo
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=D:\programing\go\bugReview\go.mod
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=C:\Users\ddaa\AppData\Local\Temp\go-build360413202=/tmp/go-build -gno-record-gcc-switches

What did you do?

https://go.dev/play/p/3ViYxZ6i_5a?v=goprev

What did you expect to see?

./prog.go:4:11: channel element type too large (>64kB)

Go build failed.

What did you see instead?

./prog.go:4:11: internal compiler error: bad type: chan struct { Field2 [1000][1000][1000]string }

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

Go build failed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.compiler/runtimeIssues related to the Go compiler and/or runtime.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions