Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 98 for pcsz (0.07 sec)

  1. test/fixedbugs/issue17381.go

    package main
    
    import (
    	"runtime"
    	"unsafe"
    )
    
    func main() {
    	defer func() {
    		if recover() == nil {
    			panic("did not panic")
    		}
    		pcs := make([]uintptr, 20)
    		n := runtime.Callers(1, pcs)
    		for _, pc := range pcs[:n] {
    			if runtime.FuncForPC(pc).Name() == "main.main" {
    				return
    			}
    		}
    		panic("cannot find main.main in backtrace")
    	}()
    
    	prep()
    	f() // should panic
    }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 25 21:44:32 UTC 2016
    - 1K bytes
    - Viewed (0)
  2. test/fixedbugs/issue21879.go

    	println(caller().frame.Function)
    
    	// Used to erroneously print "main.call.name" instead of
    	// "main.main".
    	println(caller().name())
    }
    
    func caller() call {
    	var pcs [3]uintptr
    	n := runtime.Callers(1, pcs[:])
    	frames := runtime.CallersFrames(pcs[:n])
    	frame, _ := frames.Next()
    	frame, _ = frames.Next()
    
    	return call{frame: frame}
    }
    
    type call struct {
    	frame runtime.Frame
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 19 18:35:24 UTC 2017
    - 658 bytes
    - Viewed (0)
  3. test/fixedbugs/issue10486.go

    // especially on software divide systems.
    
    package main
    
    import "runtime"
    
    var A, B int
    
    func divZero() int {
    	defer func() {
    		if p := recover(); p != nil {
    			var pcs [512]uintptr
    			runtime.Callers(2, pcs[:])
    			runtime.GC()
    		}
    	}()
    	return A / B
    }
    
    func main() {
    	A = 1
    	divZero()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 02 13:43:18 UTC 2016
    - 518 bytes
    - Viewed (0)
  4. test/fixedbugs/issue29919.dir/a.go

    package a
    
    import (
    	"fmt"
    	"runtime"
    	"strings"
    )
    
    var x = f() // line 15
    
    func f() int {
    	var b [4096]byte
    	n := runtime.Stack(b[:], false) // line 19
    	s := string(b[:n])
    	var pcs [10]uintptr
    	n = runtime.Callers(1, pcs[:]) // line 22
    
    	// Check the Stack results.
    	if debug {
    		println(s)
    	}
    	if strings.Contains(s, "autogenerated") {
    		panic("autogenerated code in traceback")
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 24 17:50:47 UTC 2022
    - 1.6K bytes
    - Viewed (0)
  5. pilot/pkg/model/proxy_config.go

    // the highest priority.
    func mergeWithPrecedence(pcs ...*meshconfig.ProxyConfig) *meshconfig.ProxyConfig {
    	merged := &meshconfig.ProxyConfig{}
    	for i := len(pcs) - 1; i >= 0; i-- {
    		if pcs[i] == nil {
    			continue
    		}
    		proxyConfigYaml, err := protomarshal.ToYAML(pcs[i])
    		if err != nil {
    			continue
    		}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Mar 21 01:23:19 UTC 2023
    - 5K bytes
    - Viewed (0)
  6. src/runtime/start_line_test.go

    			}
    		})
    	}
    }
    
    //go:noinline
    func callerStartLine(wantInlined bool) int {
    	var pcs [1]uintptr
    	n := runtime.Callers(2, pcs[:])
    	if n != 1 {
    		panic(fmt.Sprintf("no caller of callerStartLine? n = %d", n))
    	}
    
    	frames := runtime.CallersFrames(pcs[:])
    	frame, _ := frames.Next()
    
    	inlined := frame.Func == nil // Func always set to nil for inlined frames
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 20 22:54:22 UTC 2023
    - 2.6K bytes
    - Viewed (0)
  7. cmd/kubeadm/app/util/pkiutil/testing/testing.go

    	}
    }
    
    func newPrivateKey(keyType kubeadmapi.EncryptionAlgorithmType) (crypto.Signer, error) {
    	lock.Lock()
    	defer lock.Unlock()
    
    	var pcs [50]uintptr
    	nCallers := runtime.Callers(2, pcs[:])
    	frames := runtime.CallersFrames(pcs[:nCallers])
    	thisTest := ""
    	for {
    		frame, more := frames.Next()
    		if strings.HasSuffix(frame.File, "_test.go") && testFunction.MatchString(frame.Function) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jan 31 21:49:21 UTC 2024
    - 3K bytes
    - Viewed (0)
  8. test/fixedbugs/issue29504.go

    var sinkStr string
    
    var bad = false
    
    func shouldPanic(f func()) {
    	defer func() {
    		if recover() == nil {
    			panic("did not panic")
    		}
    		var pcs [10]uintptr
    		n := runtime.Callers(1, pcs[:])
    		iter := runtime.CallersFrames(pcs[:n])
    		buf := ""
    		for {
    			frame, more := iter.Next()
    			buf += fmt.Sprintf("%s:%d %s\n", frame.File, frame.Line, frame.Function)
    			if !more {
    				break
    			}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 30 21:30:30 UTC 2019
    - 2.9K bytes
    - Viewed (0)
  9. src/internal/trace/generation.go

    			}
    			frames = append(frames, pc)
    
    			if _, ok := pcs[pc]; !ok {
    				pcs[pc] = frame{
    					pc:     pc,
    					funcID: stringID(funcID),
    					fileID: stringID(fileID),
    					line:   line,
    				}
    			}
    		}
    
    		// Add the stack to the map.
    		if err := stackTable.insert(stackID(id), stack{pcs: frames}); err != nil {
    			return err
    		}
    	}
    	return nil
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 22:14:45 UTC 2024
    - 12.1K bytes
    - Viewed (0)
  10. src/log/slog/logger.go

    	if !w.h.Enabled(context.Background(), level) {
    		return 0, nil
    	}
    	var pc uintptr
    	if !internal.IgnorePC && w.capturePC {
    		// skip [runtime.Callers, w.Write, Logger.Output, log.Print]
    		var pcs [1]uintptr
    		runtime.Callers(4, pcs[:])
    		pc = pcs[0]
    	}
    
    	// Remove final newline.
    	origLen := len(buf) // Report that the entire buf was written.
    	if len(buf) > 0 && buf[len(buf)-1] == '\n' {
    		buf = buf[:len(buf)-1]
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jan 08 18:26:18 UTC 2024
    - 10.2K bytes
    - Viewed (0)
Back to top