]> Cypherpunks repositories - gostls13.git/commit
cmd/compile/internal/abi: fix ComputePadding
authorDerek Parker <parkerderek86@gmail.com>
Fri, 21 Mar 2025 19:43:32 +0000 (19:43 +0000)
committerGopher Robot <gobot@golang.org>
Fri, 21 Mar 2025 22:02:04 +0000 (15:02 -0700)
commitafe11db4a7d61d6ec196577f39b45648f987927d
tree9fcc45d183bc8ceb8139d0f0d47921a3c0d79e8b
parentba01453bbed831f143d3005abc85fd6baec36da5
cmd/compile/internal/abi: fix ComputePadding

Fixes the ComputePadding calculation to take into account the padding
added for the current offset. This fixes an issue where padding can be
added incorrectly for certain structs.

Related: https://github.com/go-delve/delve/issues/3923

Same as https://go-review.googlesource.com/c/go/+/656736 just without
the brittle test.

Fixes #72053

Change-Id: I67f157a42f5fc5d3a54d0e9be03488aa44752bcb
GitHub-Last-Rev: fabed69a31258fa8c1806f88d1cbcc745c881148
GitHub-Pull-Request: golang/go#72997
Reviewed-on: https://go-review.googlesource.com/c/go/+/659698
Reviewed-by: Cherry Mui <cherryyz@google.com>
Auto-Submit: Keith Randall <khr@golang.org>
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>
src/cmd/compile/internal/abi/abiutils.go
src/cmd/compile/internal/ssa/debug.go
src/cmd/compile/internal/test/abiutils_test.go