]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: use correct type for slice pointer
authorKeith Randall <khr@golang.org>
Tue, 28 Nov 2023 01:21:08 +0000 (17:21 -0800)
committerKeith Randall <khr@google.com>
Tue, 28 Nov 2023 05:13:40 +0000 (05:13 +0000)
commit46410b78a53a5dff4f0fb1bc181103db4029384a
treecc76114856dd19bc592a1093bda8cd99c4b5b091
parent4956c3437bd2f4448bcec51321f123d03731ddfc
cmd/compile: use correct type for slice pointer

The type of the data pointer field of a slice should be a pointer
to the element type, not a *uint8.

This ensures that the SSA value representing the slice's data pointer
can be spilled to the stack slot for the corresponding argument.
Before this change the types didn't match so we ended up spilling the
argument to an autotmp instead of to the dedicated argument slot.

Fixes #64414

Change-Id: I09ee39e93f05aee07e3eceb14e39736d7fd70a33
Reviewed-on: https://go-review.googlesource.com/c/go/+/545357
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: David Chase <drchase@google.com>
src/cmd/compile/internal/ssa/expand_calls.go
src/cmd/compile/internal/ssagen/ssa.go
src/runtime/traceback_test.go