runtime: be more strict in GC
authorIan Lance Taylor <ian@gcc.gnu.org>
Mon, 19 Aug 2019 19:09:50 +0000 (19:09 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Mon, 19 Aug 2019 19:09:50 +0000 (19:09 +0000)
commit4f6bdb08bab64b973e465fb45deb751561e3b969
tree1945ba0d73dd9ecc9361beaaa2fa056653e3bce8
parent188d00796f5bd338b9b8ab1cc8ba4b43af8ab8fd
runtime: be more strict in GC

    With CL 190599, along with what we do in greyobject, we ensure
    that we only mark allocated heap objects. As a result we can be
    more strict in GC:

    - Enable "sweep increased allocation count" check, which checks
      that the number of mark bits set are no more than the number of
      allocation bits.

    - Enable invalid pointer check on heap scan. We only trace
      allocated heap objects, which should not contain invalid
      pointer.

    This also makes the libgo runtime more convergent with the gc
    runtime.

    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/190797

From-SVN: r274678
gcc/go/gofrontend/MERGE
libgo/go/runtime/mcentral.go
libgo/go/runtime/mgcsweep.go
libgo/go/runtime/runtime1.go