From b02450da0227c757205fd16b6648bddceb980d83 Mon Sep 17 00:00:00 2001 From: Keith Randall Date: Wed, 8 Oct 2014 17:22:34 -0700 Subject: runtime: zero a few more dead pointers. In channels, zeroing of gp.waiting is missed on a closed channel panic. m.morebuf.g is not zeroed. I don't expect the latter causes any problems, but just in case. LGTM=iant R=golang-codereviews, iant CC=golang-codereviews https://golang.org/cl/151610043 --- src/runtime/stack.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/runtime/stack.c') diff --git a/src/runtime/stack.c b/src/runtime/stack.c index d1ea3ff73b..e402691f45 100644 --- a/src/runtime/stack.c +++ b/src/runtime/stack.c @@ -725,6 +725,7 @@ runtime·newstack(void) g->m->morebuf.pc = (uintptr)nil; g->m->morebuf.lr = (uintptr)nil; g->m->morebuf.sp = (uintptr)nil; + g->m->morebuf.g = (G*)nil; runtime·casgstatus(gp, Grunning, Gwaiting); gp->waitreason = runtime·gostringnocopy((byte*)"stack growth"); -- cgit v1.3