1
0
mirror of https://github.com/golang/go synced 2024-11-08 10:56:23 -07:00
go/src/cmd/vet
Elias Naur ae175f74cb runtime: fix cgo export of panicmem on ios
CL 68490 reworked the way the panicmem function is exposed to the
C mach expection catcher. However, //go:cgo_export_static isn't enough:
the underlying assembly functions must not start with the middle dot.

Without the middle dot, the panicmem function's exported name is
not prefixed with its package; rename it to xx_cgo_panicmem to decrease
the chance of a symbol name clash.

Finally, mark the overridden C symbol weak to avoid duplicate symbol
errors from the host linker.

For the ios builders.

Change-Id: Ib87789fecec9314e398cf1bd8c04ba0b3a6642af
Reviewed-on: https://go-review.googlesource.com/69113
Run-TryBot: Elias Naur <elias.naur@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
2017-10-10 08:49:16 +00:00
..
all runtime: fix cgo export of panicmem on ios 2017-10-10 08:49:16 +00:00
internal
testdata cmd/vet: skip self-assigns with side effects 2017-10-09 09:26:31 +00:00
asmdecl.go all: revert "all: prefer strings.IndexByte over strings.Index" 2017-10-05 23:19:10 +00:00
assign.go cmd/vet: skip self-assigns with side effects 2017-10-09 09:26:31 +00:00
atomic.go
bool.go
buildtag.go cmd/vet: remove two unused parameters and simplify 2017-09-07 08:26:27 +00:00
cgo.go
composite.go
copylock.go
dead.go cmd/vet: remove extraneous "//" in dead.go so its comment does not 2017-09-23 09:24:02 +00:00
deadcode.go
doc.go
httpresponse.go
lostcancel.go
main.go cmd/vet: in rangeloop check, inspect for loop variables too 2017-10-02 17:45:00 +00:00
method.go cmd/vet: remove two unused parameters and simplify 2017-09-07 08:26:27 +00:00
nilfunc.go
print.go all: revert "all: prefer strings.LastIndexByte over strings.LastIndex" 2017-10-05 23:19:42 +00:00
rangeloop.go cmd/vet: in rangeloop check, inspect for loop variables too 2017-10-02 17:45:00 +00:00
README cmd/vet: fix a couple of minor word choices in README 2017-08-14 04:15:59 +00:00
shadow.go
shift.go
structtag.go all: revert "all: prefer strings.IndexByte over strings.Index" 2017-10-05 23:19:10 +00:00
tests.go
types.go cmd/vet: unexported Stringer and error fields cannot be formatted 2017-08-29 11:59:45 +00:00
unsafeptr.go
unused.go cmd/vet: remove two unused parameters and simplify 2017-09-07 08:26:27 +00:00
vet_test.go

Vet is a tool that checks correctness of Go programs. It runs a suite of tests,
each tailored to check for a particular class of errors. Examples include incorrect
Printf format verbs and malformed build tags.

Over time many checks have been added to vet's suite, but many more have been
rejected as not appropriate for the tool. The criteria applied when selecting which
checks to add are:

Correctness:

Vet's checks are about correctness, not style. A vet check must identify real or
potential bugs that could cause incorrect compilation or execution. A check that
only identifies stylistic points or alternative correct approaches to a situation
is not acceptable.

Frequency:

Vet is run every day by many programmers, often as part of every compilation or
submission. The cost in execution time is considerable, especially in aggregate,
so checks must be likely enough to find real problems that they are worth the
overhead of the added check. A new check that finds only a handful of problems
across all existing programs, even if the problem is significant, is not worth
adding to the suite everyone runs daily.

Precision:

Most of vet's checks are heuristic and can generate both false positives (flagging
correct programs) and false negatives (not flagging incorrect ones). The rate of
both these failures must be very small. A check that is too noisy will be ignored
by the programmer overwhelmed by the output; a check that misses too many of the
cases it's looking for will give a false sense of security. Neither is acceptable.
A vet check must be accurate enough that everything it reports is worth examining,
and complete enough to encourage real confidence.