mirror of
https://github.com/golang/go
synced 2024-11-23 05:20:11 -07:00
runtime: fix heap corruption
R=golang-dev, rsc CC=golang-dev https://golang.org/cl/7397049
This commit is contained in:
parent
0cdc0b3b78
commit
94fab3cad3
@ -972,6 +972,12 @@ runtime·newextram(void)
|
|||||||
mp->locked = LockInternal;
|
mp->locked = LockInternal;
|
||||||
mp->lockedg = gp;
|
mp->lockedg = gp;
|
||||||
gp->lockedm = mp;
|
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();
|
schedunlock();
|
||||||
|
|
||||||
// Add m to the extra list.
|
// Add m to the extra list.
|
||||||
|
Loading…
Reference in New Issue
Block a user