File tree 1 file changed +18
-0
lines changed
src/cmd/cgo/internal/testsanitizers 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -16,8 +16,10 @@ import (
16
16
"encoding/json"
17
17
"errors"
18
18
"fmt"
19
+ "internal/testenv"
19
20
"os"
20
21
"os/exec"
22
+ "os/user"
21
23
"path/filepath"
22
24
"regexp"
23
25
"strconv"
@@ -266,12 +268,28 @@ func compilerSupportsLocation() bool {
266
268
case "gcc" :
267
269
return compiler .major >= 10
268
270
case "clang" :
271
+ // TODO(65606): The clang toolchain on the LUCI builders is not built against
272
+ // zlib, the ASAN runtime can't actually symbolize its own stack trace. Once
273
+ // this is resolved, one way or another, switch this back to 'true'. We still
274
+ // have coverage from the 'gcc' case above.
275
+ if inLUCIBuild () {
276
+ return false
277
+ }
269
278
return true
270
279
default :
271
280
return false
272
281
}
273
282
}
274
283
284
+ // inLUCIBuild returns true if we're currently executing in a LUCI build.
285
+ func inLUCIBuild () bool {
286
+ u , err := user .Current ()
287
+ if err != nil {
288
+ return false
289
+ }
290
+ return testenv .Builder () != "" && u .Username == "swarming"
291
+ }
292
+
275
293
// compilerRequiredTsanVersion reports whether the compiler is the version required by Tsan.
276
294
// Only restrictions for ppc64le are known; otherwise return true.
277
295
func compilerRequiredTsanVersion (goos , goarch string ) bool {
You can’t perform that action at this time.
0 commit comments