Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 18 for growstack (0.14 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/stack_test.go

    	wg.Add(1)
    	go func() {
    		defer wg.Done()
    		start := time.Now()
    		growStack(nil)
    		growDuration = time.Since(start)
    	}()
    	wg.Wait()
    	t.Log("first growStack took", growDuration)
    
    	// in locked goroutine
    	wg.Add(1)
    	go func() {
    		defer wg.Done()
    		LockOSThread()
    		growStack(nil)
    		UnlockOSThread()
    	}()
    	wg.Wait()
    
    	// in finalizer
    	var finalizerStart time.Time
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jun 14 00:03:57 UTC 2023
    - 23.1K bytes
    - Viewed (0)
  10. src/cmd/cgo/internal/test/testx.go

    //export issue7978cb
    func issue7978cb() {
    	// Force a stack growth from the callback to put extra
    	// pressure on the runtime. See issue #17785.
    	growStack(64)
    	issue7978wait(3, 4)
    }
    
    func growStack(n int) int {
    	var buf [128]int
    	if n == 0 {
    		return 0
    	}
    	return buf[growStack(n-1)]
    }
    
    func issue7978go() {
    	C.issue7978c((*C.uint32_t)(&issue7978sync))
    	issue7978wait(7, 8)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 17 21:53:11 UTC 2023
    - 10.6K bytes
    - Viewed (0)
Back to top