diff options
| author | Keith Randall <khr@golang.org> | 2019-06-08 17:20:57 +0000 |
|---|---|---|
| committer | Keith Randall <khr@golang.org> | 2019-06-10 16:19:39 +0000 |
| commit | 8f296f59de0703b0559474beb434a265e277bdca (patch) | |
| tree | 4ffd97168a989aa958ef2055f07759f29a09210b /test/codegen/stack.go | |
| parent | daf944a531fecf2431b60da608e70680f4927412 (diff) | |
| download | go-8f296f59de0703b0559474beb434a265e277bdca.tar.xz | |
Revert "Revert "cmd/compile,runtime: allocate defer records on the stack""
This reverts CL 180761
Reason for revert: Reinstate the stack-allocated defer CL.
There was nothing wrong with the CL proper, but stack allocation of defers exposed two other issues.
Issue #32477: Fix has been submitted as CL 181258.
Issue #32498: Possible fix is CL 181377 (not submitted yet).
Change-Id: I32b3365d5026600069291b068bbba6cb15295eb3
Reviewed-on: https://go-review.googlesource.com/c/go/+/181378
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'test/codegen/stack.go')
| -rw-r--r-- | test/codegen/stack.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/codegen/stack.go b/test/codegen/stack.go index ca37622286..37d378aa78 100644 --- a/test/codegen/stack.go +++ b/test/codegen/stack.go @@ -109,3 +109,8 @@ func MightPanic(a []int, i, j, k, s int) { _ = i << s // panicShift _ = i / j // panicDivide } + +func Defer() { + // amd64:`CALL\truntime\.deferprocStack` + defer func() {}() +} |
