]> Cypherpunks repositories - gostls13.git/commit
runtime: fix heap corruption during GC
authorDmitriy Vyukov <dvyukov@google.com>
Tue, 28 May 2013 15:17:47 +0000 (19:17 +0400)
committerDmitriy Vyukov <dvyukov@google.com>
Tue, 28 May 2013 15:17:47 +0000 (19:17 +0400)
commit2f5825d4273d910b0d3c9ee82336cf041e8f02d3
treec9111a8d9c0f7af125262d77f1812ae177cf43fe
parentd8fd8d89ea071c79788b34eddf31858c0e66c19b
runtime: fix heap corruption during GC
The 'n' variable is used during rescan initiation in GC_END case,
but it's overwritten with chan capacity in GC_CHAN case.
As the result rescan is done with the wrong object size.
Fixes #5554.

R=golang-dev, khr
CC=golang-dev
https://golang.org/cl/9831043
src/pkg/runtime/gc_test.go
src/pkg/runtime/mgc0.c