Search Options

Results per page
Sort
Preferred Languages
Advance

Results 71 - 80 of 650 for overflows (0.17 sec)

  1. test/prove.go

    	}
    	if j < uint(len(a)) {
    		return a[j] // ERROR "Proved IsInBounds$"
    	}
    	return 0
    }
    
    func f1c(a []int, i int64) int {
    	c := uint64(math.MaxInt64 + 10) // overflows int
    	d := int64(c)
    	if i >= d && i < int64(len(a)) {
    		// d overflows, should not be handled.
    		return a[i]
    	}
    	return 0
    }
    
    func f2(a []int) int {
    	for i := range a { // ERROR "Induction variable: limits \[0,\?\), increment 1$"
    		a[i+1] = i
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jan 23 00:02:36 UTC 2024
    - 21.2K bytes
    - Viewed (0)
  2. src/go/types/index.go

    			return false
    		}
    
    		// spec: "... and representable by a value of type int"
    		if !representableConst(x.val, check, Typ[Int], &x.val) {
    			check.errorf(x, code, invalidArg+"%s %s overflows int", what, x)
    			return false
    		}
    	}
    
    	return true
    }
    
    // indexedElts checks the elements (elts) of an array or slice composite literal
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jan 22 16:17:05 UTC 2024
    - 11.2K bytes
    - Viewed (0)
  3. test/loopbce.go

    		useString(a[i:]) // ERROR "(\([0-9]+\) )?Proved IsSliceInBounds$"
    	}
    	for i := int64(0); i < j+122+int64(-1<<63); i++ { // ERROR "Induction variable: limits \[0,\?\), increment 1$"
    		// len(a)-123+122+MinInt overflows when len(a) == 0, so a bound check is needed here
    		useString(a[i:])
    	}
    }
    
    func nobce3(a [100]int64) [100]int64 {
    	min := int64((-1) << 63)
    	max := int64((1 << 63) - 1)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:25 UTC 2023
    - 13.8K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/types2/index.go

    			return false
    		}
    
    		// spec: "... and representable by a value of type int"
    		if !representableConst(x.val, check, Typ[Int], &x.val) {
    			check.errorf(x, code, invalidArg+"%s %s overflows int", what, x)
    			return false
    		}
    	}
    
    	return true
    }
    
    // indexedElts checks the elements (elts) of an array or slice composite literal
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 15 16:16:58 UTC 2023
    - 11.5K bytes
    - Viewed (0)
  5. src/internal/pkgbits/decoder.go

    			}
    			return x, err
    		}
    		if b < 0x80 {
    			if i == binary.MaxVarintLen64-1 && b > 1 {
    				return x, overflow
    			}
    			return x | uint64(b)<<s, nil
    		}
    		x |= uint64(b&0x7f) << s
    		s += 7
    	}
    	return x, overflow
    }
    
    var overflow = errors.New("pkgbits: readUvarint overflows a 64-bit integer")
    
    func (r *Decoder) rawVarint() int64 {
    	ux := r.rawUvarint()
    
    	// Zig-zag decode.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 27 20:58:46 UTC 2022
    - 13.2K bytes
    - Viewed (0)
  6. src/internal/trace/trace_test.go

    		// The execution trace may drop CPU profile samples if the profiling buffer
    		// overflows. Based on the size of profBufWordCount, that takes a bit over
    		// 1900 CPU samples or 19 thread-seconds at a 100 Hz sample rate. If we've
    		// hit that case, then we definitely have at least one full buffer's worth
    		// of CPU samples, so we'll call that success.
    		overflowed := totalTraceSamples >= 1900
    		if traceSamples < pprofSamples {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 18.5K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/types2/typeset.go

    // type sets may choose to ignore it.
    var invalidTypeSet _TypeSet
    
    // computeUnionTypeSet may be called with check == nil.
    // The result is &invalidTypeSet if the union overflows.
    func computeUnionTypeSet(check *Checker, unionSets map[*Union]*_TypeSet, pos syntax.Pos, utyp *Union) *_TypeSet {
    	if tset, _ := unionSets[utyp]; tset != nil {
    		return tset
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 13.6K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/math/IntMathTest.java

       * arithmetic.
       */
      private static int computeMeanSafely(int x, int y) {
        BigInteger bigX = BigInteger.valueOf(x);
        BigInteger bigY = BigInteger.valueOf(y);
        BigDecimal bigMean =
            new BigDecimal(bigX.add(bigY)).divide(BigDecimal.valueOf(2), BigDecimal.ROUND_FLOOR);
        // parseInt blows up on overflow as opposed to intValue() which does not.
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Feb 07 17:50:39 UTC 2024
    - 24.5K bytes
    - Viewed (0)
  9. src/go/types/typeset.go

    // type sets may choose to ignore it.
    var invalidTypeSet _TypeSet
    
    // computeUnionTypeSet may be called with check == nil.
    // The result is &invalidTypeSet if the union overflows.
    func computeUnionTypeSet(check *Checker, unionSets map[*Union]*_TypeSet, pos token.Pos, utyp *Union) *_TypeSet {
    	if tset, _ := unionSets[utyp]; tset != nil {
    		return tset
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 13.7K bytes
    - Viewed (0)
  10. src/cmd/gofmt/gofmt.go

    	//
    	// If we have the FileInfo from filepath.WalkDir, use it to make
    	// a buffer of the right size and avoid ReadAll's reallocations.
    	//
    	// If the size is unknown (or bogus, or overflows an int), fall back to
    	// a size-independent ReadAll.
    	size := -1
    	if info != nil && info.Mode().IsRegular() && int64(int(info.Size())) == info.Size() {
    		size = int(info.Size())
    	}
    	if size+1 <= 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 14 19:41:17 UTC 2024
    - 15.1K bytes
    - Viewed (0)
Back to top