]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile: add all runtime package dependencies to NoInstrumentPkgs
authorAustin Clements <austin@google.com>
Thu, 6 Jul 2023 15:15:27 +0000 (11:15 -0400)
committerAustin Clements <austin@google.com>
Tue, 22 Aug 2023 19:18:32 +0000 (19:18 +0000)
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 <mdempsky@google.com>
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>

src/cmd/compile/internal/base/base.go

index 458481fa4edeaec9225f4f8611a459f2c52a2ce4..841241efb10617bb8a58d779961b11384e8c31c8 100644 (file)
@@ -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.