1 // $G $D/$F.go && $L $F.$A && ./$A.out
3 // Copyright 2009 The Go Authors. All rights reserved.
4 // Use of this source code is governed by a BSD-style
5 // license that can be found in the LICENSE file.
7 // Try to tickle stack splitting bugs by doing
8 // go, defer, and closure calls at different stack depths.
14 func g(c chan int, t T) {
16 for i := 0; i < len(t); i++ {
24 for i := 0; i < len(t); i++ {
28 println("bad defer", s)
33 var c = make(chan int)
35 var b = []byte{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}
39 if len(ss) != len(b) {
40 panic("bad []byte -> string")
50 for i := 0; i < len(t); i++ {
58 println("bad func", s, "at level", n)
68 for i := 0; i < len(t); i++ {