Search Options

Results per page
Sort
Preferred Languages
Advance

Results 201 - 210 of 1,675 for mypanic (0.12 sec)

  1. test/fixedbugs/issue8606b.go

    	bad2 := "foo"
    
    	p := syscall.Getpagesize()
    	b, err := syscall.Mmap(-1, 0, p, syscall.PROT_READ|syscall.PROT_WRITE, syscall.MAP_ANON|syscall.MAP_PRIVATE)
    	if err != nil {
    		panic(err)
    	}
    	err = syscall.Mprotect(b, syscall.PROT_NONE)
    	if err != nil {
    		panic(err)
    	}
    	// write inaccessible pointers as the data fields of bad1 and bad2.
    	(*reflect.StringHeader)(unsafe.Pointer(&bad1)).Data = uintptr(unsafe.Pointer(&b[0]))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:25 UTC 2023
    - 1.9K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/typecheck/const.go

    		ir.OCALLMETH,
    		ir.OCAP,
    		ir.OCLEAR,
    		ir.OCLOSE,
    		ir.OCOMPLEX,
    		ir.OCOPY,
    		ir.ODELETE,
    		ir.OIMAG,
    		ir.OLEN,
    		ir.OMAKE,
    		ir.OMAX,
    		ir.OMIN,
    		ir.ONEW,
    		ir.OPANIC,
    		ir.OPRINT,
    		ir.OPRINTLN,
    		ir.OREAL,
    		ir.ORECOVER,
    		ir.ORECOVERFP,
    		ir.ORECV,
    		ir.OUNSAFEADD,
    		ir.OUNSAFESLICE,
    		ir.OUNSAFESLICEDATA,
    		ir.OUNSAFESTRING,
    		ir.OUNSAFESTRINGDATA:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 05 15:20:28 UTC 2023
    - 10.5K bytes
    - Viewed (0)
  3. src/internal/bytealg/index_generic.go

    // Requires 2 <= len(b) <= MaxLen.
    func Index(a, b []byte) int {
    	panic("unimplemented")
    }
    
    // IndexString returns the index of the first instance of b in a, or -1 if b is not present in a.
    // Requires 2 <= len(b) <= MaxLen.
    func IndexString(a, b string) int {
    	panic("unimplemented")
    }
    
    // Cutover reports the number of failures of IndexByte we should tolerate
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 28 18:17:57 UTC 2021
    - 901 bytes
    - Viewed (0)
  4. test/fixedbugs/bug221.go

    	return x + y
    }
    
    func main() {
    	s := f(1) + f(2)
    	if s != "aAbB" {
    		println("BUG: bug221a: ", s)
    		panic("fail")
    	}
    	s = g(f(3), f(4))
    	if s != "cCdD" {
    		println("BUG: bug221b: ", s)
    		panic("fail")
    	}
    	s = f(5) + f(6) + f(7) + f(8) + f(9)
    	if s != "eEfFgGhHiI" {
    		println("BUG: bug221c: ", s)
    		panic("fail")
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Jul 11 14:36:33 UTC 2015
    - 820 bytes
    - Viewed (0)
  5. src/internal/reflectlite/swapper.go

    	v := ValueOf(slice)
    	if v.Kind() != Slice {
    		panic(&ValueError{Method: "Swapper", Kind: v.Kind()})
    	}
    	// Fast path for slices of size 0 and 1. Nothing to swap.
    	switch v.Len() {
    	case 0:
    		return func(i, j int) { panic("reflect: slice index out of range") }
    	case 1:
    		return func(i, j int) {
    			if i != 0 || j != 0 {
    				panic("reflect: slice index out of range")
    			}
    		}
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 17:34:30 UTC 2024
    - 2K bytes
    - Viewed (0)
  6. src/database/sql/fakedb_test.go

    func (s *fakeStmt) ColumnConverter(idx int) driver.ValueConverter {
    	if s.panic == "ColumnConverter" {
    		panic(s.panic)
    	}
    	if len(s.placeholderConverter) == 0 {
    		return driver.DefaultParameterConverter
    	}
    	return s.placeholderConverter[idx]
    }
    
    func (s *fakeStmt) Close() error {
    	if s.panic == "Close" {
    		panic(s.panic)
    	}
    	if s.c == nil {
    		panic("nil conn in fakeStmt.Close")
    	}
    	if s.c.db == nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 01 12:38:07 UTC 2024
    - 30.3K bytes
    - Viewed (0)
  7. src/sync/oncefunc_test.go

    		calls++
    		panic("x")
    	})
    	testOncePanicX(t, &calls, func() { f() })
    }
    
    func TestOnceValuesPanic(t *testing.T) {
    	calls := 0
    	f := sync.OnceValues(func() (int, int) {
    		calls++
    		panic("x")
    	})
    	testOncePanicX(t, &calls, func() { f() })
    }
    
    func TestOnceFuncPanicNil(t *testing.T) {
    	calls := 0
    	f := sync.OnceFunc(func() {
    		calls++
    		panic(nil)
    	})
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 21 17:31:33 UTC 2023
    - 6.9K bytes
    - Viewed (0)
  8. src/iter/iter.go

    		race.Acquire(unsafe.Pointer(&racer))
    		if done {
    			race.Release(unsafe.Pointer(&racer))
    			return
    		}
    		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
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 19:09:28 UTC 2024
    - 6.6K bytes
    - Viewed (0)
  9. test/fixedbugs/issue26097.go

    	r := v1
    	if x1 == x2 {
    		r = v2
    	}
    	return r
    }
    
    func main() {
    	if cmovClobberAX16(1, 2, 4.0, 5.0) != 1 {
    		panic("CMOVQEQF causes incorrect code")
    	}
    	if cmovClobberAX32(1, 2, 4.0, 5.0) != 1 {
    		panic("CMOVQEQF causes incorrect code")
    	}
    	if cmovClobberAX64(1, 2, 4.0, 5.0) != 1 {
    		panic("CMOVQEQF causes incorrect code")
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jun 28 18:39:56 UTC 2018
    - 829 bytes
    - Viewed (0)
  10. src/cmd/cgo/internal/testplugin/testdata/issue53989/p/p.go

    	case 7:
    		y = 49
    	case 8:
    		y = 64
    	default:
    		panic("too large")
    	}
    
    	// check PC is in the same function
    	runtime.Callers(1, pc1[:])
    	if pc1[0] < pc0[0] || pc1[0] > pc0[0]+1000000 {
    		fmt.Printf("jump across DSO boundary. pc0=%x, pc1=%x\n", pc0[0], pc1[0])
    		panic("FAIL")
    	}
    
    	if y != x*x {
    		fmt.Printf("x=%d y=%d!=%d\n", x, y, x*x)
    		panic("FAIL")
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 11:59:56 UTC 2023
    - 826 bytes
    - Viewed (0)
Back to top