]> Cypherpunks repositories - gostls13.git/commit
runtime: ensure that we don't scan noscan objects
authorKeith Randall <khr@golang.org>
Tue, 9 Aug 2022 19:52:18 +0000 (12:52 -0700)
committerKeith Randall <khr@golang.org>
Tue, 9 Aug 2022 22:28:42 +0000 (22:28 +0000)
commitcb13022a244e6c311a3494696ddffe07cfe5edf1
tree083c98a3bf0869edda14a18afb075dd3ca12ff9c
parentd39b54171a2702d5fe6fc427b60ee03c9c45da5a
runtime: ensure that we don't scan noscan objects

We claim to not maintain pointer bits for noscan objects. But in fact
we do, since whenever we switch a page from scannable to noscan, we
call heapBits.initSpan which zeroes the heap bits.

Switch to ensure that we never scan noscan objects. This ensures that
we don't depend on the ptrbits for noscan objects. That fixes a bug
in the 1-bit bitmap CL which depended on that fact.

Change-Id: I4e66f582605b53732f8fca310c1f6bd2892963cb
Reviewed-on: https://go-review.googlesource.com/c/go/+/422435
Run-TryBot: Keith Randall <khr@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Keith Randall <khr@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
src/runtime/mgcmark.go
src/runtime/mheap.go