]> Cypherpunks repositories - gostls13.git/commit
runtime: ensure we free unrolled GC bitmaps
authorKeith Randall <khr@golang.org>
Thu, 11 Jan 2024 20:52:16 +0000 (12:52 -0800)
committerGopher Robot <gobot@golang.org>
Thu, 11 Jan 2024 21:16:56 +0000 (21:16 +0000)
commit0f3876f8c12ba3746a1dfec68422e9cce5c2ff39
treeeb278463dd6e8c0ade8739382286fde0576582ba
parent25c5f6f15988f1abb9738bfdfd10331afefd8ec1
runtime: ensure we free unrolled GC bitmaps

CL 555355 has a bug in it - the GC program flag was also used to decide
when to free the unrolled bitmap. After that CL, we just don't free any
unrolled bitmaps, leading to a memory leak.

Use a separate flag to track types that need to be freed when their
corresponding object is freed.

Change-Id: I841b65492561f5b5e1853875fbd8e8a872205a84
Reviewed-on: https://go-review.googlesource.com/c/go/+/555416
Auto-Submit: Keith Randall <khr@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Keith Randall <khr@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
src/internal/abi/type.go
src/runtime/mbitmap_allocheaders.go
src/runtime/mgcsweep.go