]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.26] cmd/compile: fix mis-compilation for static array initialization
authorCuong Manh Le <cuong.manhle.vn@gmail.com>
Wed, 21 Jan 2026 07:39:20 +0000 (14:39 +0700)
committerDavid Chase <drchase@google.com>
Wed, 25 Feb 2026 19:16:21 +0000 (11:16 -0800)
commit85050c90ee22ef662dcf455a52ab050e8a4d8409
treef95ab4d891de3dbabb4c7b4a1d4bba252b9a58b4
parent12c0690eebcccf3f1aeaf7599c044edbd7ae7798
[release-branch.go1.26] cmd/compile: fix mis-compilation for static array initialization

The bug was first introduced when the compiler is still written in C,
with CL 2254041. The static array was laid out with the wrong context,
causing a stack pointer will be stored in global object.

Fixes #77252

Change-Id: I22c8393314d251beb53db537043a63714c84f36a
Reviewed-on: https://go-review.googlesource.com/c/go/+/737821
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Keith Randall <khr@golang.org>
(cherry picked from commit dae71067ce7ee41ebe752a4ee3c544506e74f824)
Reviewed-on: https://go-review.googlesource.com/c/go/+/738940
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
src/cmd/compile/internal/walk/complit.go
test/codegen/slices.go