]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: don't pull constant offsets out of pointer arithmetic
authorKeith Randall <khr@golang.org>
Mon, 24 Feb 2025 21:07:29 +0000 (13:07 -0800)
committerKeith Randall <khr@golang.org>
Wed, 26 Feb 2025 17:39:12 +0000 (09:39 -0800)
commit8b8bff7bb29210db868306cd07a03fb15e247b2f
treef8bf0f117b2ac696c215b0253695353605f59ef5
parent4c75671871af56fa68076ee3741780e52726ec82
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 #71932

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>
src/cmd/compile/internal/ssa/_gen/ARM64.rules
src/cmd/compile/internal/ssa/rewriteARM64.go
test/fixedbugs/issue71932.go [new file with mode: 0644]