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: width not calculated: int128 #53454

Closed
ShadiestGoat opened this issue Jun 19, 2022 · 8 comments
Closed
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. release-blocker
Milestone

Comments

@ShadiestGoat
Copy link

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

$ go version
go version go1.18.3 linux/amd64

Does this issue reproduce with the latest release?

Yes, this is the latest release

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

go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/shady/.cache/go-build"
GOENV="/home/shady/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/shady/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/shady/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/lib/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/go/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.18.3"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/shady/projects/bug-go/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 -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build1859839587=/tmp/go-build -gno-record-gcc-switches"

What did you do?

I tried to compile this repo

What did you expect to see?

I expected it to compile normally.

What did you see instead?

A compiler bug:

# github.com/ShadiestGoat/Go-Bug/profile
profile/matchingNew.go:48:2: internal compiler error: width not calculated: int128

Please file a bug report including a short program that triggers the error.
https://go.dev/issue/new
@ShadiestGoat ShadiestGoat changed the title Compiler: internal compiler error: width not calculated: int128 cmd/compile: internal compiler error: width not calculated: int128 Jun 19, 2022
@mengzhuo mengzhuo added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Jun 20, 2022
@mengzhuo
Copy link
Contributor

Confirmed that 1.18.3 and master affected by this issue.

cc @griesemer @ianlancetaylor

@ianlancetaylor
Copy link
Contributor

CC @randall77 @mdempsky

@mengzhuo
Copy link
Contributor

Bisect shows 9dd71ba is the first bad commit

@gopherbot
Copy link

Change https://go.dev/cl/413294 mentions this issue: cmd/compile: allow 128-bit values to be spilled

@randall77
Copy link
Contributor

@gopherbot please open a backport to 1.17 and 1.18.

This bug causes an ICE in rare circumstances.

@gopherbot
Copy link

Backport issue(s) opened: #53470 (for 1.17), #53471 (for 1.18).

Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://go.dev/wiki/MinorReleases.

@ShadiestGoat
Copy link
Author

Hello, I'm sorry, but I don't get what this means.

Is this a "won't fix" issue, or does this mean that it has been resolved?

@mvdan
Copy link
Member

mvdan commented Jun 22, 2022

@ShadiestGoat the fix has been merged into master for the upcoming Go 1.19, and will be backported to both 1.17.x and 1.18.x in their next bugfix releases.

jproberts pushed a commit to jproberts/go that referenced this issue Aug 10, 2022
We sometimes use 16-byte load+store to move values around in memory.
In rare circumstances, the loaded value must be spilled because the
store can't happen yet.

In that case, we need to be able to spill the 16-byte value.

Fixes golang#53454

Change-Id: I09fd08e11a63c6ba3ef781d3f5ede237e9b0132e
Reviewed-on: https://go-review.googlesource.com/c/go/+/413294
Reviewed-by: Keith Randall <khr@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
Run-TryBot: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
@golang golang locked and limited conversation to collaborators Jun 22, 2023
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. release-blocker
Projects
Development

No branches or pull requests

6 participants