Commit 6f6403ed authored by Austin Clements's avatar Austin Clements Committed by Russ Cox

runtime: fix checkmarks to rescan stacks

Currently checkmarks mode fails to rescan stacks because it sees the
leftover state bits indicating that the stacks haven't changed since
the last scan. As a result, it won't detect lost marks caused by
failing to scan stacks correctly during regular garbage collection.

Fix this by marking all stacks dirty before performing the checkmark
phase.

Change-Id: I1f06882bb8b20257120a4b8e7f95bb3ffc263895
Reviewed-on: https://go-review.googlesource.com/10794Reviewed-by: 's avatarRuss Cox <rsc@golang.org>
parent 0599913a
......@@ -937,6 +937,7 @@ func gc(mode int) {
// Run a full stop-the-world mark using checkmark bits,
// to check that we didn't forget to mark anything during
// the concurrent mark process.
gcResetGState() // Rescan stacks
initCheckmarks()
gcMark(startTime)
clearCheckmarks()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment