Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
24838a2d
Commit
24838a2d
authored
Sep 09, 2008
by
Rob Pike
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug in stack limit calculation - was setting limit reg in wrong place.
R=ken OCL=14981 CL=14981
parent
ffbccb66
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
9 deletions
+5
-9
proc.c
src/runtime/proc.c
+3
-8
sys_amd64_linux.s
src/runtime/sys_amd64_linux.s
+2
-1
No files found.
src/runtime/proc.c
View file @
24838a2d
...
...
@@ -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
);
}
...
...
src/runtime/sys_amd64_linux.s
View file @
24838a2d
...
...
@@ -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
MOV
L
$0xf1, BP
MOV
Q
$0xf1, BP
MOVQ BP, (BP)
RET
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment