mirror of https://github.com/golang/go.git
cmd/cgo/internal/testsanitizers: disable location checking for clang
Pending a resolution to #65606, this CL marks clang's ASAN runtime as unable to symbolize stack traces to unblock the LUCI clang builder. For #65606. Fixes #65469. Change-Id: I649773085aff30e5703e7f7ac2c72a0430a015c2 Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-clang15 Reviewed-on: https://go-review.googlesource.com/c/go/+/562675 Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
This commit is contained in:
parent
b158ca9ae3
commit
d94ab597af
|
|
@ -16,8 +16,10 @@ import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"internal/testenv"
|
||||||
"os"
|
"os"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
|
"os/user"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"regexp"
|
"regexp"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
@ -266,12 +268,28 @@ func compilerSupportsLocation() bool {
|
||||||
case "gcc":
|
case "gcc":
|
||||||
return compiler.major >= 10
|
return compiler.major >= 10
|
||||||
case "clang":
|
case "clang":
|
||||||
|
// TODO(65606): The clang toolchain on the LUCI builders is not built against
|
||||||
|
// zlib, the ASAN runtime can't actually symbolize its own stack trace. Once
|
||||||
|
// this is resolved, one way or another, switch this back to 'true'. We still
|
||||||
|
// have coverage from the 'gcc' case above.
|
||||||
|
if inLUCIBuild() {
|
||||||
|
return false
|
||||||
|
}
|
||||||
return true
|
return true
|
||||||
default:
|
default:
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// inLUCIBuild returns true if we're currently executing in a LUCI build.
|
||||||
|
func inLUCIBuild() bool {
|
||||||
|
u, err := user.Current()
|
||||||
|
if err != nil {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
return testenv.Builder() != "" && u.Username == "swarming"
|
||||||
|
}
|
||||||
|
|
||||||
// compilerRequiredTsanVersion reports whether the compiler is the version required by Tsan.
|
// compilerRequiredTsanVersion reports whether the compiler is the version required by Tsan.
|
||||||
// Only restrictions for ppc64le are known; otherwise return true.
|
// Only restrictions for ppc64le are known; otherwise return true.
|
||||||
func compilerRequiredTsanVersion(goos, goarch string) bool {
|
func compilerRequiredTsanVersion(goos, goarch string) bool {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue