From 36f223dace5dcdb7afc381c51e0484ff473e2e88 Mon Sep 17 00:00:00 2001 From: Keith Randall Date: Fri, 9 Aug 2013 15:27:45 -0700 Subject: [PATCH] runtime: Better test tracebackability of jmpdefer when running a nil defer. R=bradfitz, dvyukov CC=golang-dev https://golang.org/cl/12536046 --- test/fixedbugs/issue6055.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/fixedbugs/issue6055.go b/test/fixedbugs/issue6055.go index 4cc24d0c2c0..698f62ac956 100644 --- a/test/fixedbugs/issue6055.go +++ b/test/fixedbugs/issue6055.go @@ -6,11 +6,17 @@ package main +import "runtime" + type Closer interface { Close() } func nilInterfaceDeferCall() { + defer func() { + // make sure a traceback happens with jmpdefer on the stack + runtime.GC() + }() var x Closer defer x.Close() }