Skip to content

cmd/compile: internal compiler error: 'ensureSigM.func1': panic during regalloc while compiling ensureSigM.func1 #76413

@Cleboost

Description

@Cleboost

OS Info

CashyOS (arch based)
cashy-rc-lto kernel

Go version

go version go1.25.4 linux/amd64

Output of go env in your module/workspace:

AR='ar'
CC='gcc'
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_ENABLED='1'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
CXX='g++'
GCCGO='gccgo'
GO111MODULE=''
GOAMD64='v3'
GOARCH='amd64'
GOAUTH='netrc'
GOBIN=''
GOCACHE='/home/cleboost/.cache/go-build'
GOCACHEPROG=''
GODEBUG=''
GOENV='/home/cleboost/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFIPS140='off'
GOFLAGS=''
GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build730946926=/tmp/go-build -gno-record-gcc-switches'
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMOD='/home/cleboost/Documents/code/hostnat-admin-app/go.mod'
GOMODCACHE='/home/cleboost/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPATH='/home/cleboost/go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/usr/lib/go'
GOSUMDB='sum.golang.org'
GOTELEMETRY='local'
GOTELEMETRYDIR='/home/cleboost/.config/go/telemetry'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/usr/lib/go/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='go1.25.4'
GOWORK=''
PKG_CONFIG='pkg-config'

What did you do?

I think it's os related

What did you see happen?

When I launch any go file I got this error

    go run main.go
go: downloading fyne.io/fyne/v2 v2.7.1
go: downloading github.com/go-sql-driver/mysql v1.9.3
go: downloading filippo.io/edwards25519 v1.1.0
go: downloading github.com/fsnotify/fsnotify v1.9.0
go: downloading github.com/godbus/dbus/v5 v5.1.0
go: downloading github.com/rymdport/portal v0.4.2
go: downloading github.com/go-text/typesetting v0.2.1
go: downloading github.com/BurntSushi/toml v1.5.0
go: downloading github.com/yuin/goldmark v1.7.8
go: downloading golang.org/x/image v0.24.0
go: downloading github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646
go: downloading github.com/fredbi/uri v1.1.1
go: downloading fyne.io/systray v1.11.1-0.20250603113521-ca66a66d8b58
go: downloading github.com/fyne-io/image v0.1.1
go: downloading github.com/go-gl/glfw/v3.3/glfw v0.0.0-20240506104042-037f3cc74f2a
go: downloading github.com/go-text/render v0.2.0
go: downloading github.com/fyne-io/oksvg v0.2.0
go: downloading github.com/srwiley/rasterx v0.0.0-20220730225603-2ab79fcdd4ef
go: downloading github.com/jeandeaual/go-locale v0.0.0-20250612000132-0ef82f21eade
go: downloading github.com/nicksnyder/go-i18n/v2 v2.5.1
go: downloading golang.org/x/text v0.22.0
go: downloading github.com/go-gl/gl v0.0.0-20231021071112-07e5d0ea2e71
go: downloading golang.org/x/sys v0.30.0
go: downloading github.com/jsummers/gobmp v0.0.0-20230614200233-a9de23ed2e25
go: downloading golang.org/x/net v0.35.0
go: downloading github.com/srwiley/oksvg v0.0.0-20221011165216-be6e8873101c
# runtime
/usr/lib/go/src/runtime/signal_unix.go:1078:18: internal compiler error: 'ensureSigM.func1': panic during regalloc while compiling ensureSigM.func1:

runtime error: index out of range [-1306837782]

goroutine 3218 [running]:
cmd/compile/internal/ssa.Compile.func1()
        cmd/compile/internal/ssa/compile.go:49 +0x6c
panic({0xec79c0?, 0xc009c08078?})
        runtime/panic.go:783 +0x132
cmd/compile/internal/ssa.(*sparseSet).remove(...)
        cmd/compile/internal/ssa/sparseset.go:57
cmd/compile/internal/ssa.(*stackAllocState).computeLive(0xc00318dc80, {0xc009c41108, 0x48, 0xdf340a?})
        cmd/compile/internal/ssa/stackalloc.go:320 +0x1470
cmd/compile/internal/ssa.(*stackAllocState).init(...)
        cmd/compile/internal/ssa/stackalloc.go:112
cmd/compile/internal/ssa.stackalloc(0xc00983e000, {0xc009c41108, 0x48, 0x48})
        cmd/compile/internal/ssa/stackalloc.go:74 +0x2d5
cmd/compile/internal/ssa.(*regAllocState).regalloc(0xc009c741c0, 0xc00983e000)
        cmd/compile/internal/ssa/regalloc.go:2049 +0x1385
cmd/compile/internal/ssa.regalloc(0xc00983e000)
        cmd/compile/internal/ssa/regalloc.go:149 +0x3d
cmd/compile/internal/ssa.Compile(0xc00983e000)
        cmd/compile/internal/ssa/compile.go:97 +0xc19
cmd/compile/internal/ssagen.buildssa(0xc00449e140, 0x1, 0x0)
        cmd/compile/internal/ssagen/ssa.go:611 +0x2d8e
cmd/compile/internal/ssagen.Compile(0xc00449e140, 0x1, 0x0?)
        cmd/compile/internal/ssagen/pgen.go:304 +0x88
cmd/compile/internal/gc.compileFunctions.func5.1(0x0?)
        cmd/compile/internal/gc/compile.go:191 +0x38
cmd/compile/internal/gc.compileFunctions.func3.1()
        cmd/compile/internal/gc/compile.go:173 +0x30
created by cmd/compile/internal/gc.compileFunctions.func3 in goroutine 216
        cmd/compile/internal/gc/compile.go:172 +0x345



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

What did you expect to see?

Not a crash

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugReportIssues describing a possible bug in the Go implementation.compiler/runtimeIssues related to the Go compiler and/or runtime.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions