1// run
2
3// Copyright 2017 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
7package main
8
9import "runtime/debug"
10
11type Foo struct {
12	A [1 << 20]byte
13	B string
14}
15
16func run(c chan bool) {
17	f := new(Foo)
18	*f = Foo{B: "hello"}
19	c <- true
20}
21
22func main() {
23	debug.SetMaxStack(1 << 16)
24	c := make(chan bool)
25	go run(c)
26	<-c
27}
28