mirror of
https://github.com/golang/go
synced 2024-11-11 21:50:21 -07:00
runtime: Better test tracebackability of jmpdefer when running a nil defer.
R=bradfitz, dvyukov CC=golang-dev https://golang.org/cl/12536046
This commit is contained in:
parent
e3dbb1a310
commit
36f223dace
@ -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()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user