From 8f296f59de0703b0559474beb434a265e277bdca Mon Sep 17 00:00:00 2001 From: Keith Randall Date: Sat, 8 Jun 2019 17:20:57 +0000 Subject: 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 --- test/codegen/stack.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test/codegen/stack.go') 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() {}() +} -- cgit v1.3