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

Internal compiler error: 'main': not lowered: v139, Move SSA UNSAFEPTR UNSAFEPTR SSA Please file a bug report including a short program that triggers the error. #39830

Closed
qeetell opened this issue Jun 24, 2020 · 3 comments

Comments

@qeetell
Copy link

@qeetell qeetell commented Jun 24, 2020

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

$ go version

go version go1.14.4 linux/amd64

Does this issue reproduce with the latest release?

Yes

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

Deepin 15 [Linux]; AMD 64

go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/ibrahim/.cache/go-build"
GOENV="/home/ibrahim/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/ibrahim/go:/home/ibrahim/Repo"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
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-build473479359=/tmp/go-build -gno-record-gcc-switches"

What did you do?

I tried to install a module containing a file containing the following [go install]:

package main

import (
	"fmt"
	pkge "github.com/qeetell-aaaa/aaaaaaab"
)

func main () {
	aome := []byte {1, 2}
	bome := pkge.RemoveLastByte (aome)
	come := pkge.RemoveLastByte (bome)
	dome := pkge.RemoveLastByte (come)
	eome := pkge.RemoveLastByte (dome)
	fome := pkge.RemoveLastByte (eome)
	fmt.Println (aome, bome, come, dome, eome, fome)
}

What did you expect to see?

[1, 2] [1] [] [] [] []

What did you see instead?

# github.com/qeetell-aaaa/aaaaaaab/RemoveLastByte_Test
./test.go:10:30: internal compiler error: 'main': not lowered: v139, Move SSA UNSAFEPTR UNSAFEPTR SSA

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

@randall77
Copy link
Contributor

@randall77 randall77 commented Jun 24, 2020

Well, it should run and panic with makeslice: len out of range when the size passed to make goes negative.

But the compiler shouldn't crash.
This works correctly in 1.11. It starts failing in 1.12. It continues to fail though and including 1.14, then works correctly again at tip.

So there's nothing to do for tip. I'm leaning against backporting a fix for this. It only happens for a program that would otherwise be guaranteed to panic. And it has been broken for a really long while without anyone noticing.

@qeetell
Copy link
Author

@qeetell qeetell commented Jun 24, 2020

Thanks @randall77

@randall77
Copy link
Contributor

@randall77 randall77 commented Jun 24, 2020

Probably a dup of #36259, which was fixed in February.

@randall77 randall77 closed this Jun 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.