From: Dmitriy Vyukov Date: Wed, 20 Feb 2013 17:17:56 +0000 (+0400) Subject: runtime: prepare for M's running w/o mcache X-Git-Tag: go1.1rc2~949 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=1e063eea38fe3ecc8bea4e35bc0482fa8100ea80;p=gostls13.git runtime: prepare for M's running w/o mcache Can not happen ATM. In preparation for the new scheduler. R=golang-dev, rsc CC=golang-dev https://golang.org/cl/7388043 --- diff --git a/src/pkg/runtime/panic.c b/src/pkg/runtime/panic.c index a0651e4ad5..603ff62eb3 100644 --- a/src/pkg/runtime/panic.c +++ b/src/pkg/runtime/panic.c @@ -382,6 +382,8 @@ nomatch: void runtime·startpanic(void) { + if(m->mcache == nil) // can happen if called from signal handler or throw + m->mcache = runtime·allocmcache(); if(m->dying) { runtime·printf("panic during panic\n"); runtime·exit(3);