1
0
mirror of https://github.com/golang/go synced 2024-09-30 16:18:35 -06:00
go/go
Joe Tsai e3f0bd94ad go/ast/inspector: impose maximum capacity
Consider a pathological file that contains a single string that
is 1GiB large. The current heuristic for allocating the
events would create a slice that is 330M elements large, when
only a small number of events would ever be needed. This may easily
cause the analysis to OOM on the pathological file.

Alleviate the consequences of a pathological file by imposing
a maximum number of events.

Change-Id: I937bb8a3f479866631c4895ac1e729458f6e5e34
Reviewed-on: https://go-review.googlesource.com/c/tools/+/227861
Run-TryBot: Joe Tsai <thebrokentoaster@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Alan Donovan <adonovan@google.com>
2020-04-10 18:16:43 +00:00
..
analysis go/analysis/passes/unreachable: add suggested-fix to remove dead code 2020-03-27 18:58:09 +00:00
ast go/ast/inspector: impose maximum capacity 2020-04-10 18:16:43 +00:00
buildutil all: fix more typos 2019-09-11 15:13:14 +00:00
callgraph all: add a space before +build in build tag comments 2019-09-08 12:23:18 +00:00
cfg all: fix some staticcheck errors 2020-01-29 04:53:41 +00:00
expect go/packages/packagestest: do not overwrite existing go.mod file 2020-02-06 15:23:23 +00:00
gccgoexportdata go/gccgoexportdata: correctly handle archive files containing string tables 2016-11-09 21:28:38 +00:00
gcexportdata go/gcexportdata: use IExportData when writing gcexportdata 2019-10-04 02:16:33 +00:00
internal internal/lsp/cache: add concurrency error check for go cmds 2020-04-08 03:22:09 +00:00
loader Revert "go/packages: temporarily disable some tests running on go tip with -race" 2019-10-28 14:32:39 +00:00
packages go/packages: replace darwin with netbsd in TestSizes 2020-04-09 17:04:54 +00:00
pointer all: fix some staticcheck errors 2020-01-29 04:53:41 +00:00
ssa go/ssa/interp: remove unused import 2020-02-25 20:57:19 +00:00
types all: fix some staticcheck errors 2020-01-29 04:53:41 +00:00
vcs go/vcs: ignore "mod" VCS type 2019-05-06 14:53:03 +00:00