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.
15
c := make(chan bool, 1)
18
time.Sleep(10 * time.Millisecond)
23
func f1(done chan bool) {
27
runtime.Goexit() // left stack-allocated Panic struct on gp->panic stack
32
func f2(done chan bool) {
38
time.Sleep(10 * time.Millisecond) // overwrote Panic struct with Timer struct
39
runtime.GC() // walked gp->panic list, found mangled Panic struct, crashed