From 1e063eea38fe3ecc8bea4e35bc0482fa8100ea80 Mon Sep 17 00:00:00 2001 From: Dmitriy Vyukov Date: Wed, 20 Feb 2013 21:17:56 +0400 Subject: [PATCH] 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 --- src/pkg/runtime/panic.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pkg/runtime/panic.c b/src/pkg/runtime/panic.c index a0651e4ad55..603ff62eb3c 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);