mirror of
https://github.com/golang/go
synced 2024-11-22 00:04:41 -07:00
fix bug in stack limit calculation - was setting limit reg in wrong place.
R=ken OCL=14981 CL=14981
This commit is contained in:
parent
ffbccb66c2
commit
24838a2df6
@ -463,8 +463,6 @@ oldstack(void)
|
||||
|
||||
top = (Stktop*)m->curg->stackbase;
|
||||
|
||||
m->curg->stackbase = top->oldbase;
|
||||
m->curg->stackguard = top->oldguard;
|
||||
siz2 = (top->magic>>32) & 0xffffLL;
|
||||
|
||||
sp = (byte*)top;
|
||||
@ -474,15 +472,12 @@ oldstack(void)
|
||||
mcpy(top->oldsp+16, sp, siz2);
|
||||
}
|
||||
|
||||
// call no more functions after this point - limit register disagrees with R15
|
||||
m->curg->stackbase = top->oldbase;
|
||||
m->curg->stackguard = top->oldguard;
|
||||
m->morestack.SP = top->oldsp+8;
|
||||
m->morestack.PC = (byte*)(*(uint64*)(top->oldsp+8));
|
||||
|
||||
// prints("oldstack sp=");
|
||||
// sys·printpointer(m->morestack.SP);
|
||||
// prints(" pc=");
|
||||
// sys·printpointer(m->morestack.PC);
|
||||
// prints("\n");
|
||||
|
||||
gogoret(&m->morestack, m->cret);
|
||||
}
|
||||
|
||||
|
@ -81,6 +81,7 @@ TEXT sigtramp(SB),7,$24-16
|
||||
|
||||
TEXT sys·mmap(SB),7,$0-32
|
||||
MOVQ 8(SP), DI
|
||||
MOVQ $0, SI
|
||||
MOVL 16(SP), SI
|
||||
MOVL 20(SP), DX
|
||||
MOVL 24(SP), R10
|
||||
@ -103,7 +104,7 @@ TEXT sys·mmap(SB),7,$0-32
|
||||
RET
|
||||
|
||||
TEXT notok(SB),7,$0
|
||||
MOVL $0xf1, BP
|
||||
MOVQ $0xf1, BP
|
||||
MOVQ BP, (BP)
|
||||
RET
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user