...
Run Format

Source file test/fixedbugs/issue18636.go

Documentation: test/fixedbugs

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

View as plain text