Skip to content

Commit b6f59cb

Browse files
committed
cmd/vet/all: update whitelist for vet fixes
The vetall builder runs vet straight out of golang.org/x/tools, so submiting CL 176097 in that repo will break the builder by making all these whitelist entries stale. Submiting this CL will fix it, by removing them. The addition of the gcWriteBarrier declaration in runtime/stubs.go is necessary because the diagnostic is no longer emitted on arm, so it must be removed from all.txt. Adding it to runtime is better than adding it to every-other-goarch.txt. For #31916. Change-Id: I432f6049cd3ee5a467add5066c440be8616d9d54 Reviewed-on: https://go-review.googlesource.com/c/go/+/176177 Run-TryBot: Russ Cox <[email protected]> Reviewed-by: Austin Clements <[email protected]>
1 parent 5286b2a commit b6f59cb

24 files changed

+7
-105
lines changed
Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
// aix/ppc64-specific vet whitelist. See readme.txt for details.
22

33
runtime/asm_ppc64x.s: [ppc64] sigreturn: function sigreturn missing Go declaration
4-
runtime/sys_aix_ppc64.s: [ppc64] callCfunction: function callCfunction missing Go declaration
54
runtime/sys_aix_ppc64.s: [ppc64] _asmsyscall6: function _asmsyscall6 missing Go declaration
6-
runtime/sys_aix_ppc64.s: [ppc64] _sigtramp: function _sigtramp missing Go declaration
7-
runtime/sys_aix_ppc64.s: [ppc64] _sigtramp: use of 16(R1) points beyond argument frame
85
runtime/sys_aix_ppc64.s: [ppc64] _tstart: function _tstart missing Go declaration

src/cmd/vet/all/whitelist/all.txt

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,5 @@
11
// Non-platform-specific vet whitelist. See readme.txt for details.
22

3-
// Real problems that we can't fix.
4-
5-
// This is a bad WriteTo signature. Errors are being ignored!
6-
// However, we can't change it due to the Go 1 compatibility promise.
7-
go/types/scope.go: method WriteTo(w io.Writer, n int, recurse bool) should have signature WriteTo(io.Writer) (int64, error)
8-
9-
10-
// False positives.
11-
12-
// The write barrier is called directly by the compiler, so no Go def
13-
runtime/asm_ARCHSUFF.s: [GOARCH] gcWriteBarrier: function gcWriteBarrier missing Go declaration
14-
15-
// Legitimate vet complaints in which we are testing for correct runtime behavior
16-
// in bad situations that vet can also detect statically.
17-
encoding/json/decode_test.go: struct field m has json tag but is not exported
18-
encoding/json/decode_test.go: struct field m2 has json tag but is not exported
19-
encoding/json/decode_test.go: struct field s has json tag but is not exported
20-
encoding/json/tagkey_test.go: struct field tag `:"BadFormat"` not compatible with reflect.StructTag.Get: bad syntax for struct tag key
21-
223
// Compiler tests that make sure even vet-failing code adheres to the spec.
234
cmd/compile/internal/gc/testdata/arithConst_test.go: a (64 bits) too small for shift of 4294967296
245
cmd/compile/internal/gc/testdata/arithConst_test.go: a (64 bits) too small for shift of 4294967296
@@ -45,7 +26,6 @@ cmd/compile/internal/gc/testdata/short_test.go: unreachable code
4526
cmd/internal/bio/buf.go: method Seek(offset int64, whence int) int64 should have signature Seek(int64, int) (int64, error)
4627
cmd/internal/bio/buf.go: method Seek(offset int64, whence int) int64 should have signature Seek(int64, int) (int64, error)
4728
fmt/print.go: method WriteByte(c byte) should have signature WriteByte(byte) error
48-
runtime/pprof/pprof.go: method WriteTo(w io.Writer, debug int) error should have signature WriteTo(io.Writer) (int64, error)
4929

5030
// Also non-standard, but this method is on an unexported type, so it's
5131
// irrelevant.
@@ -56,7 +36,3 @@ cmd/link/link_test.go: struct field tag "\n\tLondon. Michaelmas term lately over
5636
cmd/link/link_test.go: struct field tag "\n\tIt was grand to see how the wind awoke, and bent the trees, and drove the rain before it like a cloud of smoke; and to hear the solemn thunder, and to see the lightning; and while thinking with awe of the tremendous powers by which our little lives are encompassed, to consider how beneficent they are, and how upon the smallest flower and leaf there was already a freshness poured from all this seeming rage, which seemed to make creation new again." not compatible with reflect.StructTag.Get: bad syntax for struct tag key
5737
cmd/link/link_test.go: struct field tag "\n\tJarndyce and Jarndyce drones on. This scarecrow of a suit has, over the course of time, become so complicated, that no man alive knows what it means. The parties to it understand it least; but it has been observed that no two Chancery lawyers can talk about it for five minutes, without coming to a total disagreement as to all the premises. Innumerable children have been born into the cause; innumerable young people have married into it; innumerable old people have died out of it. Scores of persons have deliriously found themselves made parties in Jarndyce and Jarndyce, without knowing how or why; whole families have inherited legendary hatreds with the suit. The little plaintiff or defendant, who was promised a new rocking-horse when Jarndyce and Jarndyce should be settled, has grown up, possessed himself of a real horse, and trotted away into the other world. Fair wards of court have faded into mothers and grandmothers; a long procession of Chancellors has come in and gone out; the legion of bills in the suit have been transformed into mere bills of mortality; there are not three Jarndyces left upon the earth perhaps, since old Tom Jarndyce in despair blew his brains out at a coffee-house in Chancery Lane; but Jarndyce and Jarndyce still drags its dreary length before the Court, perennially hopeless." not compatible with reflect.StructTag.Get: bad syntax for struct tag key
5838
cmd/link/link_test.go: struct field tag "\n\tThe one great principle of the English law is, to make business for itself. There is no other principle distinctly, certainly, and consistently maintained through all its narrow turnings. Viewed by this light it becomes a coherent scheme, and not the monstrous maze the laity are apt to think it. Let them but once clearly perceive that its grand principle is to make business for itself at their expense, and surely they will cease to grumble." not compatible with reflect.StructTag.Get: bad syntax for struct tag key
59-
60-
// Tests of Decode(nil) trigger legitimate diagnostics.
61-
encoding/gob/encoder_test.go: call of Decode passes non-pointer
62-
encoding/gob/encoder_test.go: call of Decode passes non-pointer

src/cmd/vet/all/whitelist/android_arm.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,3 @@
22

33
runtime/sys_linux_arm.s: [arm] clone: 12(R13) should be stk+4(FP)
44
runtime/sys_linux_arm.s: [arm] clone: 8(R13) should be flags+0(FP)
5-
runtime/sys_linux_arm.s: [arm] read_tls_fallback: function read_tls_fallback missing Go declaration

src/cmd/vet/all/whitelist/arm.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,9 @@
22

33
// Intentionally missing declarations.
44
runtime/asm_arm.s: [arm] emptyfunc: function emptyfunc missing Go declaration
5-
runtime/asm_arm.s: [arm] armPublicationBarrier: function armPublicationBarrier missing Go declaration
65
runtime/asm_arm.s: [arm] usplitR0: function usplitR0 missing Go declaration
76
runtime/asm_arm.s: [arm] addmoduledata: function addmoduledata missing Go declaration
87
runtime/duff_arm.s: [arm] duffzero: function duffzero missing Go declaration
98
runtime/duff_arm.s: [arm] duffcopy: function duffcopy missing Go declaration
10-
runtime/tls_arm.s: [arm] save_g: function save_g missing Go declaration
119
runtime/tls_arm.s: [arm] load_g: function load_g missing Go declaration
1210
runtime/tls_arm.s: [arm] _initcgo: function _initcgo missing Go declaration
13-
14-
runtime/internal/atomic/asm_arm.s: [arm] cas: function cas missing Go declaration

src/cmd/vet/all/whitelist/arm64.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,5 @@
22

33
// Intentionally missing declarations.
44
runtime/asm_arm64.s: [arm64] addmoduledata: function addmoduledata missing Go declaration
5-
runtime/duff_arm64.s: [arm64] duffzero: function duffzero missing Go declaration
6-
runtime/duff_arm64.s: [arm64] duffcopy: function duffcopy missing Go declaration
75
runtime/tls_arm64.s: [arm64] load_g: function load_g missing Go declaration
86
runtime/tls_arm64.s: [arm64] save_g: function save_g missing Go declaration

src/cmd/vet/all/whitelist/freebsd_arm.txt

Lines changed: 0 additions & 3 deletions
This file was deleted.

src/cmd/vet/all/whitelist/linux_arm.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ runtime/sys_linux_arm.s: [arm] clone: 12(R13) should be stk+4(FP)
66
runtime/sys_linux_arm.s: [arm] clone: 8(R13) should be flags+0(FP)
77

88
// Special functions.
9-
runtime/sys_linux_arm.s: [arm] read_tls_fallback: function read_tls_fallback missing Go declaration
109
runtime/sys_linux_arm.s: [arm] access: function access missing Go declaration
1110
runtime/sys_linux_arm.s: [arm] connect: function connect missing Go declaration
1211
runtime/sys_linux_arm.s: [arm] socket: function socket missing Go declaration

src/cmd/vet/all/whitelist/mips64x.txt

Lines changed: 0 additions & 5 deletions
This file was deleted.

src/cmd/vet/all/whitelist/mipsx.txt

Lines changed: 0 additions & 7 deletions
This file was deleted.

src/cmd/vet/all/whitelist/nacl_amd64p32.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ runtime/asm_amd64p32.s: [amd64p32] morestack: use of 8(SP) points beyond argumen
55
runtime/asm_amd64p32.s: [amd64p32] morestack: use of 16(SP) points beyond argument frame
66
runtime/asm_amd64p32.s: [amd64p32] morestack: use of 8(SP) points beyond argument frame
77

8-
runtime/sys_nacl_amd64p32.s: [amd64p32] sigtramp: unknown variable ctxt
9-
runtime/sys_nacl_amd64p32.s: [amd64p32] sigtramp: unknown variable ctxt
108
runtime/sys_nacl_amd64p32.s: [amd64p32] sigtramp: unknown variable ctxt
119
runtime/sys_nacl_amd64p32.s: [amd64p32] sigtramp: unknown variable ctxt
1210
runtime/sys_nacl_amd64p32.s: [amd64p32] sigtramp: unknown variable ctxt

src/cmd/vet/all/whitelist/nacl_arm.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,3 @@
22

33
runtime/sys_nacl_arm.s: [arm] nacl_clock_gettime: function nacl_clock_gettime missing Go declaration
44
runtime/sys_nacl_arm.s: [arm] nacl_sysinfo: function nacl_sysinfo missing Go declaration
5-
runtime/sys_nacl_arm.s: [arm] read_tls_fallback: function read_tls_fallback missing Go declaration

src/cmd/vet/all/whitelist/netbsd_386.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// netbsd/386-specific vet whitelist. See readme.txt for details.
22

33
runtime/sys_netbsd_ARCHSUFF.s: [GOARCH] settls: function settls missing Go declaration
4+
runtime/sys_netbsd_ARCHSUFF.s: [GOARCH] sigreturn_tramp: function sigreturn_tramp missing Go declaration
45

56
runtime/sys_netbsd_386.s: [386] sigreturn_tramp: use of 140(SP) points beyond argument frame
67
runtime/sys_netbsd_386.s: [386] sigreturn_tramp: use of 4(SP) points beyond argument frame
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
// netbsd/amd64-specific vet whitelist. See readme.txt for details.
22

3+
runtime/sys_netbsd_ARCHSUFF.s: [GOARCH] sigreturn_tramp: function sigreturn_tramp missing Go declaration
4+
35
runtime/sys_netbsd_amd64.s: [amd64] settls: function settls missing Go declaration
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
// netbsd/arm-specific vet whitelist. See readme.txt for details.
22

3-
runtime/sys_netbsd_arm.s: [arm] read_tls_fallback: function read_tls_fallback missing Go declaration
43
syscall/asm_netbsd_arm.s: [arm] Syscall9: unknown variable trap; offset 0 is num+0(FP)
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
// netbsd-specific vet whitelist. See readme.txt for details.
2-
31
runtime/sys_netbsd_ARCHSUFF.s: [GOARCH] sigreturn_tramp: function sigreturn_tramp missing Go declaration

src/cmd/vet/all/whitelist/openbsd_arm.txt

Lines changed: 0 additions & 3 deletions
This file was deleted.

src/cmd/vet/all/whitelist/plan9_arm.txt

Lines changed: 0 additions & 3 deletions
This file was deleted.

src/cmd/vet/all/whitelist/ppc64x.txt

Lines changed: 0 additions & 8 deletions
This file was deleted.

src/cmd/vet/all/whitelist/s390x.txt

Lines changed: 0 additions & 20 deletions
This file was deleted.

src/cmd/vet/all/whitelist/wasm.txt

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,3 @@ runtime/asm_wasm.s: [wasm] morestack: use of 8(SP) points beyond argument frame
99

1010
// rt0_go does not allocate a stack frame.
1111
runtime/asm_wasm.s: [wasm] rt0_go: use of 8(SP) points beyond argument frame
12-
13-
// Calling WebAssembly import. No write from Go assembly.
14-
runtime/sys_wasm.s: [wasm] nanotime: RET without writing to 8-byte ret+0(FP)
15-
runtime/sys_wasm.s: [wasm] scheduleTimeoutEvent: RET without writing to 4-byte ret+8(FP)
16-
syscall/js/js_js.s: [wasm] stringVal: RET without writing to 8-byte ret+16(FP)
17-
syscall/js/js_js.s: [wasm] valueGet: RET without writing to 8-byte ret+24(FP)
18-
syscall/js/js_js.s: [wasm] valueIndex: RET without writing to 8-byte ret+16(FP)
19-
syscall/js/js_js.s: [wasm] valueCall: RET without writing to 8-byte ret+48(FP)
20-
syscall/js/js_js.s: [wasm] valueInvoke: RET without writing to 8-byte ret+32(FP)
21-
syscall/js/js_js.s: [wasm] valueNew: RET without writing to 8-byte ret+32(FP)
22-
syscall/js/js_js.s: [wasm] valueLength: RET without writing to 8-byte ret+8(FP)
23-
syscall/js/js_js.s: [wasm] valuePrepareString: RET without writing to 8-byte ret+8(FP)
24-
syscall/js/js_js.s: [wasm] valueInstanceOf: RET without writing to 1-byte ret+16(FP)

src/cmd/vet/all/whitelist/windows.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,4 @@
33
// Issue 18609
44
crypto/x509/root_windows.go: unreachable code
55

6-
runtime/sys_windows_ARCHSUFF.s: [GOARCH] sigtramp: function sigtramp missing Go declaration
76
runtime/sys_windows_ARCHSUFF.s: [GOARCH] onosstack: unknown variable usec; offset 0 is fn+0(FP)

src/cmd/vet/all/whitelist/windows_386.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ runtime/sys_windows_386.s: [386] setldt: function setldt missing Go declaration
66
runtime/sys_windows_386.s: [386] callbackasm1+0: function callbackasm1+0 missing Go declaration
77
runtime/sys_windows_386.s: [386] tstart: function tstart missing Go declaration
88
runtime/sys_windows_386.s: [386] tstart_stdcall: RET without writing to 4-byte ret+4(FP)
9+
runtime/sys_windows_386.s: [386] sigtramp: function sigtramp missing Go declaration

src/cmd/vet/all/whitelist/windows_amd64.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// windows/amd64-specific vet whitelist. See readme.txt for details.
22

3-
runtime/sys_windows_amd64.s: [amd64] ctrlhandler: 16(SP) should be _type+0(FP)
43
runtime/sys_windows_amd64.s: [amd64] ctrlhandler: RET without writing to 4-byte ret+8(FP)
54
runtime/sys_windows_amd64.s: [amd64] callbackasm1: function callbackasm1 missing Go declaration
65
runtime/sys_windows_amd64.s: [amd64] tstart_stdcall: RET without writing to 4-byte ret+8(FP)

src/runtime/stubs.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,3 +316,6 @@ func bool2int(x bool) int {
316316
// signal handler, which will attempt to tear down the runtime
317317
// immediately.
318318
func abort()
319+
320+
// Called from compiled code; declared for vet; do NOT call from Go.
321+
func gcWriteBarrier()

0 commit comments

Comments
 (0)