Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for growstack (0.15 sec)

  1. test/fixedbugs/issue16331.go

    		f := reflect.MakeFunc(t, F).Interface().(func())
    		defer f()
    		growstack(10000)
    		done <- true
    	}()
    	<-done
    	go func() {
    		// Test reflect.methodValueCall.
    		f := reflect.ValueOf(T{}).Method(0).Interface().(func())
    		defer f()
    		growstack(10000)
    		done <- true
    	}()
    	<-done
    }
    
    func growstack(x int) {
    	if x == 0 {
    		return
    	}
    	growstack(x - 1)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 17 18:57:01 UTC 2016
    - 839 bytes
    - Viewed (0)
  2. test/fixedbugs/issue10353.go

    	}
    	// Grow stack so that partial call x becomes invalid if allocated on stack.
    	growstack(10000)
    	c := make(chan bool)
    	// Spoil the previous stack segment.
    	go func() {
    		c <- true
    	}()
    	<-c
    	return f
    }
    
    func growstack(x int) {
    	if x == 0 {
    		return
    	}
    	growstack(x - 1)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 01 13:47:20 UTC 2015
    - 917 bytes
    - Viewed (0)
  3. src/cmd/compile/internal/ssa/testdata/i22600.go

    func test() {
    	pwd, err := os.Getwd()
    	if err != nil {
    		fmt.Println(err)
    		os.Exit(1)
    	}
    	fmt.Println(pwd)
    }
    
    func main() {
    	growstack() // Use stack early to prevent growth during test, which confuses gdb
    	test()
    }
    
    var snk string
    
    //go:noinline
    func growstack() {
    	snk = fmt.Sprintf("%#v,%#v,%#v", 1, true, "cat")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 23 18:05:07 UTC 2018
    - 358 bytes
    - Viewed (0)
  4. test/fixedbugs/issue24419.go

    package main
    
    import (
    	"bytes"
    	"strings"
    )
    
    func growstack(n int) {
    	if n > 0 {
    		growstack(n - 1)
    	}
    }
    
    func main() {
    	c := make(chan struct{})
    	go compare(c)
    	go equal(c)
    	go indexByte(c)
    	go indexByteString(c)
    	<-c
    	<-c
    	<-c
    	<-c
    }
    
    func compare(c chan struct{}) {
    	defer bytes.Compare(nil, nil)
    	growstack(10000)
    	c <- struct{}{}
    }
    func equal(c chan struct{}) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jul 10 17:13:53 UTC 2018
    - 813 bytes
    - Viewed (0)
  5. src/cmd/compile/internal/ssa/testdata/i22558.go

    //go:noinline
    func isFoo(t *thing, b big) bool {
    	return true
    }
    
    func main() {
    	growstack() // Use stack early to prevent growth during test, which confuses gdb
    	t := &thing{name: "t", self: nil, next: nil, stuff: make([]big, 1)}
    	u := thing{name: "u", self: t, next: t, stuff: make([]big, 1)}
    	test(t, &u)
    }
    
    var snk string
    
    //go:noinline
    func growstack() {
    	snk = fmt.Sprintf("%#v,%#v,%#v", 1, true, "cat")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 23 18:05:07 UTC 2018
    - 773 bytes
    - Viewed (0)
  6. src/cmd/compile/internal/ssa/testdata/hist.go

    		}
    		t += i * a
    		n += a
    		fmt.Fprintf(os.Stderr, "%d\t%d\t%d\t%d\t%d\n", i, a, n, i*a, t) //gdb-dbg=(n,i,t)
    	}
    }
    
    func main() {
    	growstack() // Use stack early to prevent growth during test, which confuses gdb
    	test()
    }
    
    var snk string
    
    //go:noinline
    func growstack() {
    	snk = fmt.Sprintf("%#v,%#v,%#v", 1, true, "cat")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 23 18:05:07 UTC 2018
    - 2.4K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/ssa/testdata/scopes.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package main
    
    import (
    	"fmt"
    	"time"
    )
    
    func main() {
    	growstack() // Use stack early to prevent growth during test, which confuses gdb
    	test()
    }
    
    //go:noinline
    func id(x int) int {
    	return x
    }
    
    func test() {
    	x := id(0)
    	y := id(0)
    	fmt.Println(x)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 23 18:05:07 UTC 2018
    - 1.4K bytes
    - Viewed (0)
  8. src/runtime/race/race_test.go

    }
    
    func BenchmarkStackLeak(b *testing.B) {
    	done := make(chan bool, 1)
    	for i := 0; i < b.N; i++ {
    		go func() {
    			growStack(rand.Intn(100))
    			done <- true
    		}()
    		<-done
    	}
    }
    
    func growStack(i int) {
    	if i == 0 {
    		return
    	}
    	growStack(i - 1)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 13 18:45:54 UTC 2021
    - 6K bytes
    - Viewed (0)
  9. src/runtime/debug_test.go

    	g, after := startDebugCallWorker(t)
    	defer after()
    
    	// Inject a call that grows the stack. debugCallWorker checks
    	// for stack pointer breakage.
    	if _, err := runtime.InjectDebugCall(g, func() { growStack(nil) }, nil, nil, debugCallTKill, false); err != nil {
    		t.Fatal(err)
    	}
    }
    
    //go:nosplit
    func debugCallUnsafePointWorker(gpp **runtime.G, ready, stop *uint32) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 08 15:08:04 UTC 2023
    - 8K bytes
    - Viewed (0)
Back to top