$ 6.out
panic: runtime error: invalid memory address or nil pointer dereference
[signal 11 code=0x1 addr=0x0 pc=0x1c16]
runtime.panic+0xa7 /Users/rsc/g/go/src/pkg/runtime/proc.c:1089
runtime.panic(0xf6c8, 0x25c010)
runtime.panicstring+0x69 /Users/rsc/g/go/src/pkg/runtime/runtime.c:88
runtime.panicstring(0x24814, 0x0)
runtime.sigpanic+0x144 /Users/rsc/g/go/src/pkg/runtime/darwin/thread.c:465
runtime.sigpanic()
main.f+0x16 /Users/rsc/x.go:5
main.f()
main.main+0x1c /Users/rsc/x.go:9
main.main()
runtime.mainstart+0xf /Users/rsc/g/go/src/pkg/runtime/amd64/asm.s:77
runtime.mainstart()
runtime.goexit /Users/rsc/g/go/src/pkg/runtime/proc.c:149
runtime.goexit()
R=r
CC=golang-dev
https://golang.org/cl/
4036042
gp->sig = sig;
gp->sigcode0 = info->si_code;
gp->sigcode1 = (uintptr)info->si_addr;
+ gp->sigpc = r->eip;
// Only push runtime·sigpanic if r->eip != 0.
// If r->eip == 0, probably panicked because of a
gp->sig = sig;
gp->sigcode0 = info->si_code;
gp->sigcode1 = (uintptr)info->si_addr;
+ gp->sigpc = r->rip;
// Only push runtime·sigpanic if r->rip != 0.
// If r->rip == 0, probably panicked because of a
gp->sig = sig;
gp->sigcode0 = info->si_code;
gp->sigcode1 = (uintptr)info->si_addr;
+ gp->sigpc = r->mc_eip;
// Only push runtime·sigpanic if r->mc_eip != 0.
// If r->mc_eip == 0, probably panicked because of a
gp->sig = sig;
gp->sigcode0 = info->si_code;
gp->sigcode1 = (uintptr)info->si_addr;
+ gp->sigpc = r->mc_rip;
// Only push runtime·sigpanic if r->mc_rip != 0.
// If r->mc_rip == 0, probably panicked because of a
gp->sig = sig;
gp->sigcode0 = info->si_code;
gp->sigcode1 = ((uintptr*)info)[3];
+ gp->sigpc = r->eip;
// Only push runtime·sigpanic if r->eip != 0.
// If r->eip == 0, probably panicked because of a
gp->sig = sig;
gp->sigcode0 = info->si_code;
gp->sigcode1 = ((uintptr*)info)[2];
+ gp->sigpc = r->rip;
// Only push runtime·sigpanic if r->rip != 0.
// If r->rip == 0, probably panicked because of a
gp->sig = sig;
gp->sigcode0 = info->si_code;
gp->sigcode1 = r->fault_address;
+ gp->sigpc = r->arm_pc;
// If this is a leaf function, we do smash LR,
// but we're not going back there anyway.
reflect·call(d->fn, d->args, d->siz);
if(p->recovered) {
g->panic = p->link;
+ if(g->panic == nil) // must be done with signal
+ g->sig = 0;
runtime·free(p);
// put recovering defer back on list
// for scheduler to find.
}
runtime·panicking++;
- runtime·printf("\npanic PC=%X\n", (uint64)(uintptr)&unused);
+ if(g->sig != 0)
+ runtime·printf("\n[signal %d code=%p addr=%p pc=%p]\n",
+ g->sig, g->sigcode0, g->sigcode1, g->sigpc);
+
+ runtime·printf("\n");
if(runtime·gotraceback()){
runtime·traceback(runtime·getcallerpc(&unused), runtime·getcallersp(&unused), 0, g);
runtime·tracebackothers(g);
}
+
runtime·breakpoint(); // so we can grab it in a debugger
runtime·exit(2);
}
int32 sig;
uintptr sigcode0;
uintptr sigcode1;
+ uintptr sigpc;
};
struct M
{
=========== ./cmp2.go
panic: runtime error: comparing uncomparable type []int
-panic PC=xxx
=========== ./cmp3.go
panic: runtime error: comparing uncomparable type []int
-panic PC=xxx
=========== ./cmp4.go
panic: runtime error: hash of unhashable type []int
-panic PC=xxx
=========== ./cmp5.go
panic: runtime error: hash of unhashable type []int
-panic PC=xxx
=========== ./deferprint.go
printing: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
=========== interface/fail.go
panic: interface conversion: *main.S is not main.I: missing method Foo
-panic PC=xxx
=========== interface/returntype.go
panic: interface conversion: *main.S is not main.I2: missing method Name
-panic PC=xxx
== nilptr/
=========== fixedbugs/bug113.go
panic: interface conversion: interface is int, not int32
-panic PC=xxx
=========== fixedbugs/bug148.go
2 3
panic: interface conversion: interface is main.T, not main.T
-panic PC=xxx
== bugs/