]> Cypherpunks.ru repositories - gostls13.git/commit
runtime: initialize pointer bits of noscan spans
authorKeith Randall <khr@golang.org>
Tue, 23 Aug 2022 17:40:31 +0000 (10:40 -0700)
committerKeith Randall <khr@golang.org>
Tue, 23 Aug 2022 20:12:59 +0000 (20:12 +0000)
commita6e6b11e3a443ef532bc9b710e893e111f8ea2a3
tree496e5a401999eb0da8cb9aa445fa2c66f6c0e049
parente1114fdf883de7484c49343d966fd9759ce48c40
runtime: initialize pointer bits of noscan spans

Some code paths in the runtime (cgo, heapdump) request heap bits
without first checking that the span is !noscan. Instead of trying
to find and work around all those cases, just set the pointer bits
of noscan spans correctly. It's somewhat safer than ensuring we
caught all the possible cases.

Fixes #54557
Fixes #54558

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