]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/vet/all: move suspicious shift whitelists to 64 bit
authorJosh Bleecher Snyder <josharian@gmail.com>
Tue, 28 Feb 2017 19:02:08 +0000 (11:02 -0800)
committerJosh Bleecher Snyder <josharian@gmail.com>
Tue, 28 Feb 2017 19:12:00 +0000 (19:12 +0000)
This is an inconsequential consequence of updating
math/big to use math/bits.

Better would be to teach the vet shift test
to size int/uint/uintptr to the platform in use,
eliminating the whole category of "might be too small".
Filed #19321 for that.

Change-Id: I7e0b837bd329132d7a564468c18502dd2e724fc6
Reviewed-on: https://go-review.googlesource.com/37576
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/cmd/vet/all/whitelist/64bit.txt
src/cmd/vet/all/whitelist/all.txt

index 35b9eb3ed056ed72d54cca3184197f77e3bc1705..b2c8e05b599b361f23e516629bee6d4e6960644d 100644 (file)
@@ -11,3 +11,18 @@ runtime/hashmap.go: hash might be too small for shift of 56
 runtime/hashmap.go: hash might be too small for shift of 56
 runtime/hashmap_fast.go: hash might be too small for shift of 56
 runtime/hashmap_fast.go: hash might be too small for shift of 56
+math/big/arith.go: x might be too small for shift of 32
+math/big/arith.go: y might be too small for shift of 32
+math/big/arith.go: w0 might be too small for shift of 32
+math/big/arith.go: t might be too small for shift of 32
+math/big/arith.go: w1 might be too small for shift of 32
+math/big/arith.go: v might be too small for shift of 32
+math/big/arith.go: un10 might be too small for shift of 32
+math/big/arith.go: (xi&yi | (xi|yi)&^zi) might be too small for shift of 63
+math/big/arith.go: (yi&^xi | (yi|^xi)&zi) might be too small for shift of 63
+math/big/arith.go: xi &^ zi might be too small for shift of 63
+math/big/arith.go: (zi &^ xi) might be too small for shift of 63
+math/big/nat.go: t too small for shift of 64
+math/big/nat.go: x too small for shift of 64
+math/big/nat.go: yi might be too small for shift of 60
+math/big/nat.go: yi might be too small for shift of 60
index 97e121813bf121c014ddb5ee364559d7edb915ec..3a154e9d23553e63dad7e3a90b7a1e3dee68e9c2 100644 (file)
@@ -52,25 +52,8 @@ encoding/xml/read_test.go: method UnmarshalXML(d *Decoder, start StartElement) e
 // Mostly code that uses clever const tricks to determine
 // or use the size of an int or pointer (and related values).
 image/png/paeth.go: x might be too small for shift of 63
-math/big/arith.go: x might be too small for shift of 32
-math/big/arith.go: y might be too small for shift of 32
-math/big/arith.go: w0 might be too small for shift of 32
-math/big/arith.go: t might be too small for shift of 32
-math/big/arith.go: w1 might be too small for shift of 32
-math/big/arith.go: v might be too small for shift of 32
-math/big/arith.go: un10 might be too small for shift of 32
-math/big/arith.go: (xi&yi | (xi|yi)&^zi) might be too small for shift of 63
-math/big/arith.go: (yi&^xi | (yi|^xi)&zi) might be too small for shift of 63
-math/big/arith.go: xi &^ zi might be too small for shift of 63
-math/big/arith.go: (zi &^ xi) might be too small for shift of 63
 math/big/float.go: x[i] might be too small for shift of 32
-math/big/nat.go: t too small for shift of 64
-math/big/nat.go: x too small for shift of 64
-math/big/nat.go: ((x & -x) * (deBruijn64 & _M)) might be too small for shift of 58
 math/big/nat.go: Word(rand.Uint32()) might be too small for shift of 32
-math/big/nat.go: yi might be too small for shift of 60
-math/big/nat.go: yi might be too small for shift of 60
-runtime/cpuprof.go: h might be too small for shift of 56
 runtime/malloc.go: uintptr(i) might be too small for shift of 40
 runtime/malloc.go: uintptr(i) might be too small for shift of 40
 runtime/malloc.go: uintptr(i) might be too small for shift of 40