Skip to content

internal/cpu: incorrect CPU features bit parsing on loong64 cause illegal instruction core dumps on LA364 cores [1.24 backport] #76378

@abner-chenc

Description

@abner-chenc

Go version

go version go1.25.4 linux/loong64

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=''
GOARCH='loong64'
GOAUTH='netrc'
GOEXPERIMENT=''
GOFIPS140='off'
GOFLAGS=''
GOGCCFLAGS='-fPIC -mabi=lp64d -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build2622822263=/tmp/go-build -gno-record-gcc-switches'
GOHOSTARCH='loong64'
GOHOSTOS='linux'
GOINSECURE=''
GOMOD='/dev/null'
GOMODCACHE='/home/data/chenguoqi/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPATH='/home/data/chenguoqi/go'
GOPRIVATE=''
GOPROXY='https://goproxy.cn'
GOROOT='/usr/lib/go-1.25'
GOSUMDB='sum.golang.org'
GOTELEMETRY='local'
GOTELEMETRYDIR='/home/data/chenguoqi/.config/go/telemetry'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/usr/lib/go-1.25/pkg/tool/linux_loong64'
GOVERSION='go1.25.4'
PKG_CONFIG='pkg-config'

What did you do?

git clone https://github.com/golang/go.git && cd go && git checkout origin/release-branch.go1.24 -b release-branch.go1.24
export GOROOT_BOOTSTRAP=/usr/lib/go-1.25
cd src && ./make.bash -a

What did you see happen?

[chenguoqi@2k3000-openeuler24-40-51 src]$ ./all.bash -a
Building Go cmd/dist using /usr/lib/go-1.25. (go1.25.4 linux/loong64)
Building Go toolchain1 using /usr/lib/go-1.25.
Building Go bootstrap cmd/go (go_bootstrap) using Go toolchain1.
Building Go toolchain2 using go_bootstrap and Go toolchain1.
go tool dist: FAILED: /home/chenguoqi/go-upstream/pkg/tool/linux_loong64/go_bootstrap install -pgo=off cmd/asm cmd/cgo cmd/compile cmd/link cmd/preprofile: signal: illegal instruction (core dumped)

What did you expect to see?

run all.bash passed

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugReportIssues describing a possible bug in the Go implementation.CherryPickApprovedUsed during the release process for point releasesarch-loong64Issues solely affecting the loongson architecture.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