Descriptionruntime: 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
Patch Set 1 #Patch Set 2 : diff -r 6700bc3c932e8e488267c02c2f325e2d0e8887db https://dvyukov%40google.com@code.google.com/p/go/ #Patch Set 3 : diff -r 6700bc3c932e8e488267c02c2f325e2d0e8887db https://dvyukov%40google.com@code.google.com/p/go/ #Patch Set 4 : diff -r 6700bc3c932e8e488267c02c2f325e2d0e8887db https://dvyukov%40google.com@code.google.com/p/go/ #Patch Set 5 : diff -r 6700bc3c932e8e488267c02c2f325e2d0e8887db https://dvyukov%40google.com@code.google.com/p/go/ #Patch Set 6 : diff -r 7414af99c2bfea08f9c4f6774b858224e7c2a8fe https://dvyukov%40google.com@code.google.com/p/go/ #MessagesTotal messages: 4
|