Commit 94fab3ca authored by Dmitriy Vyukov's avatar Dmitriy Vyukov

runtime: fix heap corruption

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/7397049
parent 0cdc0b3b
......@@ -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.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment