Skip to content

cmd/compile: infinite loop in regalloc #77181

@RaduBerinde

Description

@RaduBerinde

Go version

go version go1.25.3 darwin/arm64

Output of go env in your module/workspace:

AR='ar'
CC='clang'
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_ENABLED='1'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
CXX='clang++'
GCCGO='gccgo'
GO111MODULE='on'
GOARCH='arm64'
GOARM64='v8.0'
GOAUTH='netrc'
GOBIN=''
GOCACHE='/Users/radu/Library/Caches/go-build'
GOCACHEPROG=''
GODEBUG=''
GOENV='/Users/radu/Library/Application Support/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFIPS140='off'
GOFLAGS=''
GOGCCFLAGS='-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/x0/5yrxw_4s271g705vjscld23c0000gq/T/go-build2292036946=/tmp/go-build -gno-record-gcc-switches -fno-common'
GOHOSTARCH='arm64'
GOHOSTOS='darwin'
GOINSECURE=''
GOMOD='/Users/radu/xorfilter/go.mod'
GOMODCACHE='/Users/radu/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='darwin'
GOPATH='/Users/radu/go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/Users/radu/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.25.3.darwin-arm64'
GOSUMDB='sum.golang.org'
GOTELEMETRY='local'
GOTELEMETRYDIR='/Users/radu/Library/Application Support/go/telemetry'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/Users/radu/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.25.3.darwin-arm64/pkg/tool/darwin_arm64'
GOVCS=''
GOVERSION='go1.25.3'
GOWORK=''
PKG_CONFIG='pkg-config'

What did you do?

git clone https://github.com/RaduBerinde/xorfilter
cd xorfilter
git checkout e8256d3
time go build .

So far so good:

real    0m0.064s
user    0m0.030s
sys     0m0.074s
git checkout 8fc10d9
time go build .

Does not finish, at least not within a few minutes. Process uses a lot of CPU and RAM.

8fc10d9 is a small patch on top of e8256d3

I tried go clean and go clean -cache, no difference.

What did you see happen?

go build . gets stuck on 8fc10d9

What did you expect to see?

go build . does not get stuck :)

Metadata

Metadata

Assignees

Labels

BugReportIssues describing a possible bug in the Go implementation.NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.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