]> Cypherpunks repositories - gostls13.git/commit
runtime: fix data race in stackalloc
authorDmitriy Vyukov <dvyukov@google.com>
Fri, 8 Aug 2014 16:13:57 +0000 (20:13 +0400)
committerDmitriy Vyukov <dvyukov@google.com>
Fri, 8 Aug 2014 16:13:57 +0000 (20:13 +0400)
commitd6d7170de414c16a7ea0125b5a458272557227b6
treed64418ad748b85a19ece7c72e50de5e04a88cedf
parenta83bbc9c488fb5b5405a5d1dc13a32d588a2fccd
runtime: fix data race in stackalloc
Stack shrinking happens during mark phase,
and it assumes that it owns stackcache in mcache.
Stack cache flushing also happens during mark phase,
and it accesses stackcache's w/o any synchronization.
This leads to stackcache corruption:
http://goperfd.appspot.com/log/309af5571dfd7e1817259b9c9cf9bcf9b2c27610

LGTM=khr
R=khr
CC=golang-codereviews, rsc
https://golang.org/cl/126870043
src/pkg/runtime/stack.c