]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.24] cmd/compile: don't pull constant offsets out of pointer arith...
authorKeith Randall <khr@golang.org>
Mon, 24 Feb 2025 21:07:29 +0000 (13:07 -0800)
committerMichael Pratt <mpratt@google.com>
Wed, 26 Feb 2025 20:15:08 +0000 (12:15 -0800)
commit949eae84df4d0294c19378f939012707e4e1bb24
tree95b4cd195b26ac1785f1e1e71d0e40010996b272
parent0bfde51e0d98097fed74e7a3e86e96da259325e1
[release-branch.go1.24] cmd/compile: don't pull constant offsets out of pointer arithmetic

This could lead to manufacturing a pointer that points outside
its original allocation.

Bug was introduced in CL 629858.

Fixes #71938

Change-Id: Ia86ab0b65ce5f80a8e0f4f4c81babd07c5904f8d
Reviewed-on: https://go-review.googlesource.com/c/go/+/652078
Reviewed-by: Keith Randall <khr@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
(cherry picked from commit 8b8bff7bb29210db868306cd07a03fb15e247b2f)
Reviewed-on: https://go-review.googlesource.com/c/go/+/652855
src/cmd/compile/internal/ssa/_gen/ARM64.rules
src/cmd/compile/internal/ssa/rewriteARM64.go
test/fixedbugs/issue71932.go [new file with mode: 0644]