From: Austin Clements Date: Thu, 6 Jul 2023 15:15:27 +0000 (-0400) Subject: cmd/compile: add all runtime package dependencies to NoInstrumentPkgs X-Git-Tag: go1.22rc1~1148 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=83e0704c50c4269d90ec654b6590ae4db554f4eb;p=gostls13.git cmd/compile: add all runtime package dependencies to NoInstrumentPkgs Currently, this list includes *almost* all runtime packages, but not quite all. We leave out internal/bytealg for reasons explained in the code. Compiling with or without race instrumentation has no effect on the other packages added to the list here, so this is a no-op change today, but makes this more robust. Change-Id: Iaec585b2efbc72983d8cb3929394524c42dd664d Reviewed-on: https://go-review.googlesource.com/c/go/+/521701 Reviewed-by: Matthew Dempsky Run-TryBot: Austin Clements TryBot-Result: Gopher Robot --- diff --git a/src/cmd/compile/internal/base/base.go b/src/cmd/compile/internal/base/base.go index 458481fa4e..841241efb1 100644 --- a/src/cmd/compile/internal/base/base.go +++ b/src/cmd/compile/internal/base/base.go @@ -245,6 +245,16 @@ var NoInstrumentPkgs = []string{ "runtime/asan", "internal/cpu", "internal/abi", + // We omit bytealg even though it's imported by runtime because it also + // backs a lot of package bytes. Currently we don't have a way to omit race + // instrumentation when used from the runtime while keeping race + // instrumentation when used from user code. Somehow this doesn't seem to + // cause problems, though we may be skating on thin ice. See #61204. + //"internal/bytealg", + "internal/coverage/rtcov", + "internal/godebugs", + "internal/goexperiment", + "internal/goos", } // Don't insert racefuncenter/racefuncexit into the following packages.