]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: only escape unsafe.Pointer conversions when -d=checkptr=2
authorMatthew Dempsky <mdempsky@google.com>
Thu, 17 Oct 2019 23:31:19 +0000 (16:31 -0700)
committerMatthew Dempsky <mdempsky@google.com>
Fri, 18 Oct 2019 23:33:48 +0000 (23:33 +0000)
commit46aa8354fa57ab5a4fb133898baf18aafbeb2e88
tree9bcdf7eba00491b13fea27d1fcbe3428bfff8e76
parent5375c71289917ac7b25c6fa4bb0f4fa17be19a07
cmd/compile: only escape unsafe.Pointer conversions when -d=checkptr=2

Escaping all unsafe.Pointer conversions for -d=checkptr seems like it
might be a little too aggressive to enable for -race/-msan mode, since
at least some tests are written to expect unsafe.Pointer conversions
to not affect escape analysis.

So instead only enable that functionality behind -d=checkptr=2.

Updates #22218.
Updates #34959.

Change-Id: I2f0a774ea5961dabec29bc5b8ebe387a1b90d27b
Reviewed-on: https://go-review.googlesource.com/c/go/+/201840
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/cmd/compile/internal/gc/escape.go
src/cmd/compile/internal/gc/main.go
src/cmd/compile/internal/gc/walk.go