From: David du Colombier <0intro@gmail.com> Date: Tue, 11 Feb 2014 08:34:43 +0000 (+0100) Subject: runtime: homogenize panic strings on Plan 9 X-Git-Tag: go1.3beta1~771 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=120218afeb74e717adf1397f04ef4ca6a10add03;p=gostls13.git runtime: homogenize panic strings on Plan 9 LGTM=rsc R=rsc CC=golang-codereviews https://golang.org/cl/61410046 --- diff --git a/src/pkg/runtime/os_plan9.c b/src/pkg/runtime/os_plan9.c index dd2828b1d9..214cb224ba 100644 --- a/src/pkg/runtime/os_plan9.c +++ b/src/pkg/runtime/os_plan9.c @@ -310,6 +310,10 @@ runtime·sigpanic(void) { if(g->sigpc == 0) runtime·panicstring("call of nil func value"); + if(runtime·strcmp((byte*)m->notesig, (byte*)"sys: trap: fault read addr") >= 0 || runtime·strcmp((byte*)m->notesig, (byte*)"sys: trap: fault write addr") >= 0) + runtime·panicstring("invalid memory address or nil pointer dereference"); + if(runtime·strcmp((byte*)m->notesig, (byte*)"sys: trap: divide error") >= 0) + runtime·panicstring("integer divide by zero"); runtime·panicstring(m->notesig); if(g->sig == 1 || g->sig == 2)