]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/compile: keep all open-coded defer slots as used
authorMatthew Dempsky <mdempsky@google.com>
Wed, 9 Aug 2023 16:04:37 +0000 (09:04 -0700)
committerMatthew Dempsky <mdempsky@google.com>
Wed, 9 Aug 2023 16:43:33 +0000 (16:43 +0000)
commit8c5a54f698873244694c8e6f20d3794a5f32ba3f
treed4c887aaf0f168b45411db9d14278f545503bd6f
parentd32b4798f844882d20920b7e75e9a889d3d0036c
cmd/compile: keep all open-coded defer slots as used

Open-coded defer slots are assigned indices upfront, so they're
logically like elements in an array. Without reassigning the indices,
we need to keep all of the elements alive so their relative offsets
are correct.

Fixes #61895.

Change-Id: Ie0191fdb33276f4e8ed0becb69086524fff022b2
Reviewed-on: https://go-review.googlesource.com/c/go/+/517856
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
src/cmd/compile/internal/ssagen/pgen.go
test/fixedbugs/issue61895.go [new file with mode: 0644]