mirror of
https://github.com/golang/go
synced 2024-11-19 15:54:46 -07:00
runtime: homogenize panic strings on Plan 9
LGTM=rsc R=rsc CC=golang-codereviews https://golang.org/cl/61410046
This commit is contained in:
parent
3d487e8458
commit
120218afeb
@ -310,6 +310,10 @@ runtime·sigpanic(void)
|
|||||||
{
|
{
|
||||||
if(g->sigpc == 0)
|
if(g->sigpc == 0)
|
||||||
runtime·panicstring("call of nil func value");
|
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);
|
runtime·panicstring(m->notesig);
|
||||||
|
|
||||||
if(g->sig == 1 || g->sig == 2)
|
if(g->sig == 1 || g->sig == 2)
|
||||||
|
Loading…
Reference in New Issue
Block a user