uintptr sp;
uintptr *src, *dst, *dstend;
G *gp;
- Gobuf label;
+ Gobuf label, morebuf;
+ void *moreargp;
bool newstackcall;
if(m->forkstackguard)
framesize = m->moreframesize;
argsize = m->moreargsize;
+ moreargp = m->moreargp;
+ m->moreargp = nil;
+ morebuf = m->morebuf;
+ m->morebuf.pc = (uintptr)nil;
+ m->morebuf.lr = (uintptr)nil;
+ m->morebuf.sp = (uintptr)nil;
gp->status = Gwaiting;
gp->waitreason = "stack split";
newstackcall = framesize==1;
top->stackbase = gp->stackbase;
top->stackguard = gp->stackguard;
- top->gobuf = m->morebuf;
- top->argp = m->moreargp;
+ top->gobuf = morebuf;
+ top->argp = moreargp;
top->argsize = argsize;
- m->moreargp = nil;
- m->morebuf.pc = (uintptr)nil;
- m->morebuf.lr = (uintptr)nil;
- m->morebuf.sp = (uintptr)nil;
// copy flag from panic
top->panic = gp->ispanic;