]> Cypherpunks repositories - gostls13.git/commit
runtime: mark and identify tiny blocks in checkfinalizers mode
authorMichael Anthony Knyszek <mknyszek@google.com>
Fri, 9 May 2025 18:53:06 +0000 (18:53 +0000)
committerGopher Robot <gobot@golang.org>
Tue, 20 May 2025 18:15:12 +0000 (11:15 -0700)
commitc58f58b9f8df0bde53bb5bc20b5ea97d34b1531d
tree3d032baae8584ef335920ebc8febebffdfaa5927
parent913c069819b77c0cfda78806654696508baf7f32
runtime: mark and identify tiny blocks in checkfinalizers mode

This change adds support for identifying cleanups and finalizers
attached to tiny blocks to checkfinalizers mode. It also notes a subtle
pitfall, which is that the cleanup arg, if tiny-allocated, could end up
co-located with the object with the cleanup attached! Oops...

For #72949.

Change-Id: Icbe0112f7dcfc63f35c66cf713216796a70121ce
Reviewed-on: https://go-review.googlesource.com/c/go/+/662037
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
src/runtime/gc_test.go
src/runtime/malloc.go
src/runtime/mcheckmark.go
src/runtime/mheap.go
src/runtime/runtime1.go
src/runtime/testdata/testprog/checkfinalizers.go