]> Cypherpunks.ru repositories - gostls13.git/commit
runtime: simplify heapBitsSetType doubleCheck
authorAustin Clements <austin@google.com>
Fri, 5 Jun 2020 20:44:29 +0000 (16:44 -0400)
committerAustin Clements <austin@google.com>
Mon, 17 Aug 2020 13:20:35 +0000 (13:20 +0000)
commit7148abc1b900555199998aac25af11783a9eb41c
treef204732c740343fa447a0e2384961ae84b099ecf
parent7bbd5ca5a6a94f58d33de6b1244248a32dc8cd9c
runtime: simplify heapBitsSetType doubleCheck

The heapBitsSetType function has a slow doubleCheck debugging mode
that checks the bitmap written out by the rest of the function using
far more obvious logic. But even this has some surprisingly complex
logic in it. Simplify it a bit. This also happens to fix the logic on
32-bit.

Fixes #40335.

Change-Id: I5cee482ad8adbd01cf5b98e35a270fe941ba4940
Reviewed-on: https://go-review.googlesource.com/c/go/+/244538
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
src/runtime/mbitmap.go