Home | History | Annotate | Download | only in fixedbugs
      1 // run
      2 
      3 // Copyright 2014 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.
      6 
      7 // issue 8132. stack walk handling of panic stack was confused
      8 // about what was legal.
      9 
     10 package main
     11 
     12 import "runtime"
     13 
     14 var p *int
     15 
     16 func main() {
     17 	func() {
     18 		defer func() {
     19 			runtime.GC()
     20 			recover()
     21 		}()
     22 		var x [8192]byte
     23 		func(x [8192]byte) {
     24 			defer func() {
     25 				if err := recover(); err != nil {
     26 					println(*p)
     27 				}
     28 			}()
     29 			println(*p)
     30 		}(x)
     31 	}()
     32 }
     33