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: mayCall SLICE2ARRPTR tc(1) PTR-*[24]byte #46720

Closed
mtharp opened this issue Jun 12, 2021 · 2 comments
Closed
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.

Comments

@mtharp
Copy link

mtharp commented Jun 12, 2021

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

$ go version
go version go1.17beta1 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="on"
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/x/.cache/go-build"
GOENV="/home/x/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/x/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/x/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/opt/go/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/opt/go/go/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.17beta1"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/x/repro/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-build3746276081=/tmp/go-build -gno-record-gcc-switches"
uname -sr: Linux 5.11.18-200.fc33.x86_64
/lib64/libc.so.6: GNU C Library (GNU libc) stable release version 2.32.
gdb --version: GNU gdb (GDB) Fedora 10.1-4.fc33

What did you do?

import "golang.org/x/crypto/nacl/secretbox"

func main() {
	nonce := make([]byte, 24)
	var key [32]byte
	secretbox.Seal(nil, nil, (*[24]byte)(nonce), &key)
}

What did you expect to see?

Compile succeeds

What did you see instead?

# dummy
./main.go:9:38: internal compiler error: mayCall 
.   SLICE2ARRPTR tc(1) PTR-*[24]byte # main.go:9 PTR-*[24]byte
.   .   NAME-main.nonce tc(1) Class:PEXTERN Offset:0 Used SLICE-[]byte # main.go:5
@ALTree ALTree added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Jun 12, 2021
@ALTree
Copy link
Member

ALTree commented Jun 12, 2021

Similar: #45917.

cc @mdempsky

@gopherbot
Copy link
Contributor

Change https://golang.org/cl/327649 mentions this issue: cmd/compile: allow ir.OSLICE2ARRPTR in mayCall

@golang golang locked and limited conversation to collaborators Jun 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

3 participants