aboutsummaryrefslogtreecommitdiff
path: root/src/syscall
diff options
context:
space:
mode:
authorRick Hudson <rlh@golang.org>2015-02-24 17:49:55 -0500
committerRick Hudson <rlh@golang.org>2015-02-25 00:14:42 +0000
commite31e35a0dea212bba08d85449554dad2969a2d91 (patch)
tree2d4c927da7ed3893758a77855f0de40aa6303c87 /src/syscall
parent42289a4f394a31e88d7288b91887c614f218808e (diff)
downloadgo-e31e35a0dea212bba08d85449554dad2969a2d91.tar.xz
runtime: reset gcscanvalid and gcworkdone when GODEBUG=gctrace=2
When GODEBUG=gctrace=2 two gcs are preformed. During the first gc the stack scan sets the g's gcscanvalid and gcworkdone flags to true indicating that the stacks have to be scanned and do not need to be rescanned. These need to be reset to false for the second GC so the stacks are rescanned, otherwise if the only pointer to an object is on the stack it will not be discovered and the object will be freed. Typically this will include the object that was just allocated in the mallocgc call that initiated the GC. Change-Id: Ic25163f4689905fd810c90abfca777324005c02f Reviewed-on: https://go-review.googlesource.com/5861 Reviewed-by: Russ Cox <rsc@golang.org>
Diffstat (limited to 'src/syscall')
0 files changed, 0 insertions, 0 deletions