Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 120 for panicIP (0.14 sec)

  1. src/iter/iter.go

    		yield := func(v1 V) bool {
    			if done {
    				return false
    			}
    			if !yieldNext {
    				panic("iter.Pull: yield called again before next")
    			}
    			yieldNext = false
    			v, ok = v1, true
    			race.Release(unsafe.Pointer(&racer))
    			coroswitch(c)
    			race.Acquire(unsafe.Pointer(&racer))
    			return !done
    		}
    		// Recover and propagate panics from seq.
    		defer func() {
    			if p := recover(); p != nil {
    				panicValue = p
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 19:09:28 UTC 2024
    - 6.6K bytes
    - Viewed (0)
  2. src/internal/trace/resources.go

    //
    // r.Kind must be ResourceGoroutine or this function will panic.
    func (r ResourceID) Goroutine() GoID {
    	if r.Kind != ResourceGoroutine {
    		panic(fmt.Sprintf("attempted to get GoID from %s resource ID", r.Kind))
    	}
    	return GoID(r.id)
    }
    
    // Proc obtains a ProcID from the resource ID.
    //
    // r.Kind must be ResourceProc or this function will panic.
    func (r ResourceID) Proc() ProcID {
    	if r.Kind != ResourceProc {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 8K bytes
    - Viewed (0)
  3. src/internal/runtime/exithook/hooks.go

    func Add(h Hook) {
    	for !locked.CompareAndSwap(0, 1) {
    		Gosched()
    	}
    	hooks = append(hooks, h)
    	locked.Store(0)
    }
    
    // Run runs the exit hooks.
    //
    // If an exit hook panics, Run will throw with the panic on the stack.
    // If an exit hook invokes exit in the same goroutine, the goroutine will throw.
    // If an exit hook invokes exit in another goroutine, that exit will block.
    func Run(code int) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 24 16:41:13 UTC 2024
    - 2.2K bytes
    - Viewed (0)
  4. src/runtime/testdata/testexithooks/testexithooks.go

    	flag.Parse()
    	switch *modeflag {
    	case "simple":
    		testSimple()
    	case "goodexit":
    		testGoodExit()
    	case "badexit":
    		testBadExit()
    	case "panics":
    		testPanics()
    	case "callsexit":
    		testHookCallsExit()
    	case "exit2":
    		testExit2()
    	default:
    		panic("unknown mode")
    	}
    }
    
    func testSimple() {
    	f1 := func() { println("foo") }
    	f2 := func() { println("bar") }
    	exithook.Add(exithook.Hook{F: f1})
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 24 16:41:13 UTC 2024
    - 2.1K bytes
    - Viewed (0)
  5. src/internal/trace/value.go

    // to that possibility.
    func (v Value) Kind() ValueKind {
    	return v.kind
    }
    
    // Uint64 returns the uint64 value for a MetricSampleUint64.
    //
    // Panics if this metric sample's Kind is not MetricSampleUint64.
    func (v Value) Uint64() uint64 {
    	if v.kind != ValueUint64 {
    		panic("Uint64 called on Value of a different Kind")
    	}
    	return v.scalar
    }
    
    // valueAsString produces a debug string value.
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 1.2K bytes
    - Viewed (0)
  6. src/sync/waitgroup.go

    		// Need to model this as a read, because there can be
    		// several concurrent wg.counter transitions from 0.
    		race.Read(unsafe.Pointer(&wg.sema))
    	}
    	if v < 0 {
    		panic("sync: negative WaitGroup counter")
    	}
    	if w != 0 && delta > 0 && v == int32(delta) {
    		panic("sync: WaitGroup misuse: Add called concurrently with Wait")
    	}
    	if v > 0 || w == 0 {
    		return
    	}
    	// This goroutine has set counter to 0 when waiters > 0.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 21:14:51 UTC 2024
    - 4K bytes
    - Viewed (0)
  7. src/runtime/ehooks_test.go

    			},
    			{
    				mode:     "goodexit",
    				expected: "orange apple",
    			},
    			{
    				mode:     "badexit",
    				expected: "blub blix",
    			},
    			{
    				mode: "panics",
    				musthave: []string{
    					"fatal error: exit hook invoked panic",
    					"main.testPanics",
    				},
    			},
    			{
    				mode: "callsexit",
    				musthave: []string{
    					"fatal error: exit hook invoked exit",
    				},
    			},
    			{
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 24 16:41:13 UTC 2024
    - 2.1K bytes
    - Viewed (0)
  8. src/errors/wrap.go

    // An error type might provide an As method so it can be treated as if it were a
    // different error type.
    //
    // As panics if target is not a non-nil pointer to either a type that implements
    // error, or to any interface type.
    func As(err error, target any) bool {
    	if err == nil {
    		return false
    	}
    	if target == nil {
    		panic("errors: target cannot be nil")
    	}
    	val := reflectlite.ValueOf(target)
    	typ := val.Type()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 24 17:13:04 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  9. src/vendor/golang.org/x/crypto/sha3/sha3.go

    	d.state = spongeSqueezing
    	d.n = d.rate
    	copyOut(d, d.storage[:d.rate])
    }
    
    // Write absorbs more data into the hash's state. It panics if any
    // output has already been read.
    func (d *state) Write(p []byte) (written int, err error) {
    	if d.state != spongeAbsorbing {
    		panic("sha3: Write after Read")
    	}
    	written = len(p)
    
    	for len(p) > 0 {
    		if d.n == 0 && len(p) >= d.rate {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 5.4K bytes
    - Viewed (0)
  10. src/runtime/os3_plan9.go

    		if pc != 0 && !findfunc(pc).valid() && findfunc(*(*uintptr)(unsafe.Pointer(sp))).valid() {
    			pc = 0
    		}
    
    		// IF LR exists, sigpanictramp must save it to the stack
    		// before entry to sigpanic so that panics in leaf
    		// functions are correctly handled. This will smash
    		// the stack frame but we're not going back there
    		// anyway.
    		if usesLR {
    			c.savelr(c.lr())
    		}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 15:41:45 UTC 2024
    - 4K bytes
    - Viewed (0)
Back to top