Skip to content

Commit

Permalink
cmd/compile: enable -d=checkptr even on windows
Browse files Browse the repository at this point in the history
CL 201783 enable -d=checkptr when -race or -msan is specified
everywhere but windows.

But, now that all unsafe pointer conversions in the standard
library are fixed, enable -d=checkptr even on windows.

Updates #34964
Updates #34972

Change-Id: Id912fa83b0d5b46c6f1c134c742fd94d2d185835
Reviewed-on: https://go-review.googlesource.com/c/go/+/227003
Run-TryBot: Alex Brainman <[email protected]>
Reviewed-by: Brad Fitzpatrick <[email protected]>
  • Loading branch information
alexbrainman committed Apr 5, 2020
1 parent 9f40f9f commit 656f27e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/cmd/compile/internal/gc/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -379,9 +379,8 @@ func Main(archInit func(*Arch)) {
if flag_race && flag_msan {
log.Fatal("cannot use both -race and -msan")
}
if (flag_race || flag_msan) && objabi.GOOS != "windows" {
// -race and -msan imply -d=checkptr for now (except on windows).
// TODO(mdempsky): Re-evaluate before Go 1.14. See #34964.
if flag_race || flag_msan {
// -race and -msan imply -d=checkptr for now.
Debug_checkptr = 1
}
if ispkgin(omit_pkgs) {
Expand Down

0 comments on commit 656f27e

Please sign in to comment.