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
1c987a32
Commit
1c987a32
authored
Feb 14, 2012
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
5g: fix memory corruption
R=ken2 CC=golang-dev
https://golang.org/cl/5666043
parent
adb1a6ce
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
gsubr.c
src/cmd/5g/gsubr.c
+2
-2
No files found.
src/cmd/5g/gsubr.c
View file @
1c987a32
...
...
@@ -346,7 +346,7 @@ anyregalloc(void)
return
0
;
}
uintptr
regpc
[
REGALLOC_
R
MAX
+
1
];
uintptr
regpc
[
REGALLOC_
F
MAX
+
1
];
/*
* allocate register of type t, leave in n.
...
...
@@ -451,7 +451,7 @@ regfree(Node *n)
if
(
n
->
op
!=
OREGISTER
&&
n
->
op
!=
OINDREG
)
fatal
(
"regfree: not a register"
);
i
=
n
->
val
.
u
.
reg
;
if
(
i
<
0
||
i
>=
sizeof
(
reg
))
if
(
i
<
0
||
i
>=
nelem
(
reg
)
||
i
>=
nelem
(
regpc
))
fatal
(
"regfree: reg out of range"
);
if
(
reg
[
i
]
<=
0
)
fatal
(
"regfree: reg not allocated"
);
...
...
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