Search Options

Results per page
Sort
Preferred Languages
Advance

Results 81 - 90 of 650 for overflows (0.43 sec)

  1. src/slices/slices_test.go

    		name  string
    		x     []struct{}
    		count int
    	}{
    		{name: "cannot be negative", x: make([]struct{}, 0), count: -1},
    		{name: "the result of (len(x) * count) overflows, hi > 0", x: make([]struct{}, 3), count: math.MaxInt},
    		{name: "the result of (len(x) * count) overflows, lo > maxInt", x: make([]struct{}, 2), count: 1 + math.MaxInt/2},
    	} {
    		if !panics(func() { _ = Repeat(test.x, test.count) }) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 26 13:32:06 UTC 2024
    - 33.2K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/typecheck/typecheck.go

    		base.Errorf("non-integer %s argument in make(%v) - %v", arg, t, n.Type())
    		return false
    	}
    
    	// Do range checks for constants before DefaultLit
    	// to avoid redundant "constant NNN overflows int" errors.
    	if n.Op() == ir.OLITERAL {
    		v := toint(n.Val())
    		if constant.Sign(v) < 0 {
    			base.Errorf("negative %s argument in make(%v)", arg, t)
    			return false
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 20 19:08:34 UTC 2024
    - 30.5K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/types/size.go

    		// field types.
    		if align := typ.align; align > maxAlign {
    			maxAlign = align
    		}
    
    		// Each field needs its own registers.
    		// We sum in uint64 to avoid possible overflows.
    		intRegs += uint64(typ.intRegs)
    		floatRegs += uint64(typ.floatRegs)
    	}
    
    	// Final size includes trailing padding.
    	size = RoundUp(size, int64(maxAlign))
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 15K bytes
    - Viewed (0)
  4. src/reflect/all_test.go

    		t.Errorf("%v should overflow float32", -ovfFloat32)
    	}
    
    	maxInt32 := int64(0x7fffffff)
    	if ovf := V(int32(0)).OverflowInt(maxInt32); ovf {
    		t.Errorf("%v wrongly overflows int32", maxInt32)
    	}
    	if ovf := V(int32(0)).OverflowInt(-1 << 31); ovf {
    		t.Errorf("%v wrongly overflows int32", -int64(1)<<31)
    	}
    	ovfInt32 := int64(1 << 31)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 218.8K bytes
    - Viewed (0)
  5. src/math/big/ratconv.go

    	// apply exp5 contributions
    	// (start with exp5 so the numbers to multiply are smaller)
    	if exp5 != 0 {
    		n := exp5
    		if n < 0 {
    			n = -n
    			if n < 0 {
    				// This can occur if -n overflows. -(-1 << 63) would become
    				// -1 << 63, which is still negative.
    				return nil, false
    			}
    		}
    		if n > 1e6 {
    			return nil, false // avoid excessively large exponents
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Nov 15 22:16:34 UTC 2023
    - 12.3K bytes
    - Viewed (0)
  6. okhttp/src/main/kotlin/okhttp3/internal/ws/RealWebSocket.kt

        data: ByteString,
        formatOpcode: Int,
      ): Boolean {
        // Don't send new frames after we've failed or enqueued a close frame.
        if (failed || enqueuedClose) return false
    
        // If this frame overflows the buffer, reject it and close the web socket.
        if (queueSize + data.size > MAX_QUEUE_SIZE) {
          close(CLOSE_CLIENT_GOING_AWAY, null)
          return false
        }
    
        // Enqueue the message frame.
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Mon Apr 01 14:21:25 UTC 2024
    - 22.1K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/walk/compare.go

    	case ir.OGE:
    		return ir.OLE
    	}
    	base.Fatalf("brrev: no rev for %v\n", op)
    	return op
    }
    
    func tracecmpArg(n ir.Node, t *types.Type, init *ir.Nodes) ir.Node {
    	// Ugly hack to avoid "constant -1 overflows uintptr" errors, etc.
    	if n.Op() == ir.OLITERAL && n.Type().IsSigned() && ir.Int64Val(n) < 0 {
    		n = copyExpr(n, n.Type(), init)
    	}
    
    	return typecheck.Conv(n, t)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 24 21:55:14 UTC 2023
    - 16.2K bytes
    - Viewed (0)
  8. src/runtime/heapdump.go

    // We use a type's hash field to pick a bucket.
    // Inside a bucket, we keep a list of types that
    // have been serialized so far, most recently used first.
    // Note: when a bucket overflows we may end up
    // serializing a type more than once. That's ok.
    const (
    	typeCacheBuckets = 256
    	typeCacheAssoc   = 4
    )
    
    type typeCacheBucket struct {
    	t [typeCacheAssoc]*_type
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 09 04:07:57 UTC 2024
    - 17.6K bytes
    - Viewed (0)
  9. src/text/template/exec.go

    		return reflect.ValueOf(constant.Float64)
    
    	case constant.IsInt:
    		n := int(constant.Int64)
    		if int64(n) != constant.Int64 {
    			s.errorf("%s overflows int", constant.Text)
    		}
    		return reflect.ValueOf(n)
    
    	case constant.IsUint:
    		s.errorf("%s overflows int", constant.Text)
    	}
    	return zero
    }
    
    func isRuneInt(s string) bool {
    	return len(s) > 0 && s[0] == '\''
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 24 21:22:24 UTC 2024
    - 32K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/walk/assign.go

    //	    n := len(s) + l2
    //	    // Compare n and s as uint so growslice can panic on overflow of len(s) + l2.
    //	    // cap is a positive int and n can become negative when len(s) + l2
    //	    // overflows int. Interpreting n when negative as uint makes it larger
    //	    // than cap(s). growslice will check the int n arg and panic if n is
    //	    // negative. This prevents the overflow from being undetected.
    //	    if uint(n) <= uint(cap(s)) {
    //	      s = s[:n]
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 08 17:09:06 UTC 2024
    - 20.3K bytes
    - Viewed (0)
Back to top