1
0
mirror of https://github.com/golang/go synced 2024-11-12 09:30:25 -07:00

runtime: fix heap corruption

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/7397049
This commit is contained in:
Dmitriy Vyukov 2013-02-21 21:59:46 +04:00
parent 0cdc0b3b78
commit 94fab3cad3

View File

@ -972,6 +972,12 @@ runtime·newextram(void)
mp->locked = LockInternal;
mp->lockedg = gp;
gp->lockedm = mp;
// put on allg for garbage collector
if(runtime·lastg == nil)
runtime·allg = gp;
else
runtime·lastg->alllink = gp;
runtime·lastg = gp;
schedunlock();
// Add m to the extra list.