]> Cypherpunks repositories - gostls13.git/commit
runtime: keep cleanup closure alive across adding the cleanup special
authorMichael Anthony Knyszek <mknyszek@google.com>
Wed, 20 Nov 2024 19:24:56 +0000 (19:24 +0000)
committerGopher Robot <gobot@golang.org>
Wed, 20 Nov 2024 19:50:09 +0000 (19:50 +0000)
commitd69e6f63c349741a450e9de9585ad555babefad4
tree7ba0ea27bfd6fae7062089ba6a19484f4f51a0c2
parent88cfad0c89014f364e3309e7ee6c4e0d3d382685
runtime: keep cleanup closure alive across adding the cleanup special

This is similar to the weak handle bug in #70455. In short, there's a
window where a heap-allocated value is only visible through a special
that has not been made visible to the GC yet.

For #70455.

Change-Id: Ic2bb2c60d422a5bc5dab8d971cfc26ff6d7622bc
Reviewed-on: https://go-review.googlesource.com/c/go/+/630277
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
src/runtime/mheap.go