Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
c792bde9
Commit
c792bde9
authored
Dec 02, 2013
by
Keith Randall
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
runtime: don't use ... formal argument to deferreturn.
R=golang-dev, rsc CC=golang-dev
https://golang.org/cl/28860043
parent
3278dc15
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
7 deletions
+10
-7
src/cmd/gc/pgen.c
src/cmd/gc/pgen.c
+6
-1
src/pkg/runtime/panic.c
src/pkg/runtime/panic.c
+4
-6
No files found.
src/cmd/gc/pgen.c
View file @
c792bde9
...
...
@@ -168,8 +168,13 @@ compile(Node *fn)
if
(
retpc
)
patch
(
retpc
,
pc
);
ginit
();
if
(
hasdefer
)
if
(
hasdefer
)
{
ginscall
(
deferreturn
,
0
);
// deferreturn pretends to have one uintptr argument.
// Reserve space for it so stack scanner is happy.
if
(
maxarg
<
widthptr
)
maxarg
=
widthptr
;
}
if
(
curfn
->
exit
)
genlist
(
curfn
->
exit
);
gclean
();
...
...
src/pkg/runtime/panic.c
View file @
c792bde9
...
...
@@ -157,14 +157,12 @@ runtime·deferproc(int32 siz, FuncVal *fn, ...)
// is called again and again until there are no more deferred functions.
// Cannot split the stack because we reuse the caller's frame to
// call the deferred function.
//
// The ... in the prototype keeps the compiler from declaring
// an argument frame size. deferreturn is a very special function,
// and if the runtime ever asks for its frame size, that means
// the traceback routines are probably broken.
// The single argument isn't actually used - it just has its address
// taken so it can be matched against pending defers.
#pragma textflag NOSPLIT
void
runtime
·
deferreturn
(
uintptr
arg0
,
...
)
runtime
·
deferreturn
(
uintptr
arg0
)
{
Defer
*
d
;
byte
*
argp
;
...
...
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