Skip to content

cmd/compile: compiler crash when redefining "len" #28285

@quitehimself

Description

@quitehimself

Please answer these questions before submitting your issue. Thanks!

What did you do?

https://play.golang.org/p/ilGD2NT2dum

What did you expect to see?

A compiler error admonishing me not to redefine "len," or perhaps berating me for attempting to call an int as a function.

What did you see instead?

The compiler panicked due to a segfault.

Does this issue reproduce with the latest release (go1.11.1)?

Yes - the compiler in the Go Playground crashes, and that is running 1.11.1.

System details

(private information sanitized)

go version go1.11 windows/amd64
GOARCH="amd64"
GOBIN=""
GOCACHE="%LocalAppData%\go-build"
GOEXE=".exe"
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="windows"
GOOS="windows"
GOPATH="%USERPROFILE%\go"
GOPROXY=""
GORACE=""
GOROOT="C:\Go"
GOTMPDIR=""
GOTOOLDIR="C:\Go\pkg\tool\windows_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
GOROOT/bin/go version: go version go1.11 windows/amd64
GOROOT/bin/go tool compile -V: compile version go1.11

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions