waspanic = false;
// If the PC is goexit, the goroutine hasn't started yet.
- if(pc == (uintptr)runtime·goexit) {
+ if(pc == (uintptr)runtime·goexit && gp->entry != 0) {
pc = (uintptr)gp->entry;
lr = (uintptr)runtime·goexit;
}
waspanic = false;
// If the PC is goexit, the goroutine hasn't started yet.
- if(pc0 == gp->sched.pc && sp == (byte*)gp->sched.sp && pc0 == (byte*)runtime·goexit) {
+ if(pc0 == gp->sched.pc && sp == (byte*)gp->sched.sp && pc0 == (byte*)runtime·goexit && gp->entry != 0) {
fp = sp;
lr = pc;
pc = (uintptr)gp->entry;
}
- // If the PC is zero, it's likely a nil function call.
- // Start in the caller's frame.
- if(pc == 0) {
- pc = lr;
- lr = 0;
- }
-
// If the PC is zero, it's likely a nil function call.
// Start in the caller's frame.
if(pc == 0) {