]> Cypherpunks repositories - gostls13.git/commit
runtime: fix non-in-use span check
authorAustin Clements <austin@google.com>
Mon, 8 Oct 2018 23:24:46 +0000 (19:24 -0400)
committerAustin Clements <austin@google.com>
Tue, 9 Oct 2018 18:19:59 +0000 (18:19 +0000)
commit7d2f46dacddba279c5b6b7520c7f6a475e6fffbc
treef8795f3bad792b96f029b0646ba6e03e8ea6c061
parent1d09433ec072c2acff27335c2d05ce44bb501ecc
runtime: fix non-in-use span check

Lazy mcache flushing (golang.org/cl/134783) introduced a second value
for sweepgen that indicates a span has been swept. I missed adding
this case to a sanity check in sweepone, so it can now panic if it
finds a non-in-use spans that's been swept *and* put in an mcache.

Fix this by adding the second sweepgen case to this check.

Fixes #27997.

Change-Id: I568d9f2cc8923396ca897a37d154cd2c859c7bef
Reviewed-on: https://go-review.googlesource.com/c/140697
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/runtime/mgcsweep.go