]> Cypherpunks repositories - gostls13.git/commit
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)
committerGopher Robot <gobot@golang.org>
Thu, 22 Jan 2026 15:30:19 +0000 (07:30 -0800)
commitdae71067ce7ee41ebe752a4ee3c544506e74f824
tree400e212dc7aba8e8527b967aa751eb0af2cfd4ee
parentadb64adfd74470a0653dde9214a1acb0ddf72268
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 #61730
Fixes #77193

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>
src/cmd/compile/internal/walk/complit.go
test/codegen/slices.go