Repository: go
Issue: cmd/cgo/internal/testtls: `signal arrived during external code execution` on Windows with clang 14.0.6
Labels: help wanted,OS-Windows,NeedsInvestigation,compiler/runtime

<!-- Please answer these questions before submitting your issue. Thanks! -->

### What version of Go are you using (`go version`)?

<pre>
$ go version
go version devel go1.22-0c7e5d3 Thu Nov 23 17:33:57 2023 +0000 windows/amd64
</pre>

### Does this issue reproduce with the latest release?
yes.

### What operating system and processor architecture are you using (`go env`)?

<details><summary><code>go env</code> Output</summary><br><pre>
$ go env
set GO111MODULE=
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\26454\AppData\Local\go-build
set GOENV=C:\Users\26454\AppData\Roaming\go\env
set GOEXE=.exe
set GOEXPERIMENT=
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=D:\file\gofile\pkg\mod
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=D:\file\gofile
set GOPRIVATE=
set GOPROXY=https://goproxy.cn,direct
set GOROOT=D:\file\gofile\gogit\go1
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLCHAIN=local
set GOTOOLDIR=D:\file\gofile\gogit\go1\pkg\tool\windows_amd64
set GOVCS=
set GOVERSION=devel go1.22-0c7e5d3 Thu Nov 23 17:33:57 2023 +0000
set GCCGO=gccgo
set GOAMD64=v3
set AR=ar
set CC=clang
set CXX=g++
set CGO_ENABLED=1
set GOMOD=D:\file\gofile\gogit\go1\src\go.mod
set GOWORK=
set CGO_CFLAGS=-O2 -g
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-O2 -g
set CGO_FFLAGS=-O2 -g
set CGO_LDFLAGS=-O2 -g
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fno-caret-diagnostics -Qunused-arguments -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=D:\tmp\go-build2393969416=/tmp/go-build -gno-record-gcc-switches
GOROOT/bin/go version: go version devel go1.22-0c7e5d3b8db Thu Nov 23 17:33:57 2023 +0000 windows/amd64
GOROOT/bin/go tool compile -V: compile version devel go1.22-0c7e5d3b8db Thu Nov 23 17:33:57 2023 +0000
lldb --version: lldb version 14.0.6
</pre></details>

### What did you do?

clang get from https://winlibs.com/ 
GCC 12.1.0 + LLVM/Clang/LLD/LLDB 14.0.6 + MinGW-w64 10.0.0 (MSVCRT) - release 3

In cmd
cd $GOROOT/src

all

### What did you expect to see?
ALL TESTS PASSED


### What did you see instead?
<details><summary>Output</summary><br><pre>
Building Go cmd/dist using C:\Users\26454\.go\gotip. (devel go1.22-0c7e5d3 Thu Nov 23 17:33:57 2023 +0000 windows/amd64)
Building Go toolchain1 using C:\Users\26454\.go\gotip.
Building Go bootstrap cmd/go (go_bootstrap) using Go toolchain1.
Building Go toolchain2 using go_bootstrap and Go toolchain1.
Building Go toolchain3 using go_bootstrap and Go toolchain2.
Building packages and commands for windows/amd64.

##### Test execution environment.
# GOARCH: amd64
# CPU: AMD Ryzen 7 7840HS w/ Radeon 780M Graphics
# GOOS: windows
# OS Version: 10.0.22621

##### Testing packages.
ok      archive/tar     1.305s
ok      archive/zip     1.320s
ok      bufio   0.973s
ok      bytes   1.091s
ok      cmp     0.898s
ok      compress/bzip2  0.839s
ok      compress/flate  1.246s
ok      compress/gzip   1.537s
ok      compress/lzw    0.834s
ok      compress/zlib   0.922s
ok      container/heap  0.925s
ok      container/list  0.908s
ok      container/ring  0.954s
ok      context 1.175s
ok      crypto  0.768s
ok      crypto/aes      0.907s
ok      crypto/cipher   0.745s
ok      crypto/des      0.918s
ok      crypto/dsa      0.813s
ok      crypto/ecdh     0.843s
ok      crypto/ecdsa    1.255s
ok      crypto/ed25519  1.205s
ok      crypto/elliptic 0.885s
ok      crypto/hmac     1.060s
ok      crypto/internal/alias   0.953s
ok      crypto/internal/bigmod  0.918s
ok      crypto/internal/boring  0.926s
ok      crypto/internal/boring/bcache   0.865s
ok      crypto/internal/edwards25519    0.962s
ok      crypto/internal/edwards25519/field      0.877s
ok      crypto/internal/nistec  1.055s
ok      crypto/internal/nistec/fiat     0.802s [no tests to run]
ok      crypto/md5      0.841s
ok      crypto/rand     0.903s
ok      crypto/rc4      0.887s
ok      crypto/rsa      1.170s
ok      crypto/sha1     0.976s
ok      crypto/sha256   0.839s
ok      crypto/sha512   0.849s
ok      crypto/subtle   0.929s
ok      crypto/tls      1.997s
ok      crypto/x509     1.306s
ok      database/sql    1.749s
ok      database/sql/driver     1.007s
ok      debug/buildinfo 0.874s
ok      debug/dwarf     1.336s
ok      debug/elf       0.925s
ok      debug/gosym     1.056s
ok      debug/macho     0.979s
ok      debug/pe        32.335s
ok      debug/plan9obj  0.907s
ok      embed   0.943s [no tests to run]
ok      embed/internal/embedtest        0.956s
ok      encoding/ascii85        0.810s
ok      encoding/asn1   0.923s
ok      encoding/base32 0.944s
ok      encoding/base64 0.878s
ok      encoding/binary 0.944s
ok      encoding/csv    0.954s
ok      encoding/gob    1.858s
ok      encoding/hex    1.112s
ok      encoding/json   1.121s
ok      encoding/pem    1.328s
ok      encoding/xml    1.079s
ok      errors  1.021s
ok      expvar  1.003s
ok      flag    1.143s
ok      fmt     1.024s
ok      go/ast  0.968s
ok      go/build        2.962s
ok      go/build/constraint     0.876s
ok      go/constant     0.913s
ok      go/doc  2.147s
ok      go/doc/comment  3.886s
ok      go/format       0.902s
ok      go/importer     3.298s
ok      go/internal/gccgoimporter       1.052s
ok      go/internal/gcimporter  12.086s
ok      go/internal/srcimporter 32.152s
ok      go/parser       1.567s
ok      go/printer      1.337s
ok      go/scanner      1.074s
ok      go/token        1.008s
ok      go/types        34.867s
ok      go/version      0.840s
ok      hash    1.080s
ok      hash/adler32    0.932s
ok      hash/crc32      1.141s
ok      hash/crc64      0.900s
ok      hash/fnv        0.945s
ok      hash/maphash    1.065s
ok      html    1.134s
ok      html/template   1.442s
ok      image   1.035s
ok      image/color     0.966s
ok      image/draw      0.998s
ok      image/gif       1.310s
ok      image/jpeg      1.541s
ok      image/png       1.576s
ok      index/suffixarray       1.041s
ok      internal/abi    1.531s
ok      internal/buildcfg       0.827s
ok      internal/coverage/cformat       0.811s
ok      internal/coverage/cmerge        1.020s
ok      internal/coverage/pods  1.058s
ok      internal/coverage/slicereader   1.040s
ok      internal/coverage/slicewriter   0.966s
ok      internal/coverage/test  1.195s
ok      internal/cpu    0.874s
ok      internal/dag    0.931s
ok      internal/diff   1.098s
ok      internal/fmtsort        0.897s
ok      internal/fuzz   1.096s
ok      internal/godebug        4.745s
ok      internal/godebugs       0.968s
ok      internal/gover  0.969s
ok      internal/intern 1.459s
ok      internal/itoa   0.892s
ok      internal/platform       4.039s
ok      internal/poll   1.007s
ok      internal/profile        0.927s
ok      internal/reflectlite    0.943s
ok      internal/safefilepath   1.063s
ok      internal/saferio        1.240s
ok      internal/singleflight   1.371s
ok      internal/syscall/windows        1.046s
ok      internal/syscall/windows/registry       0.941s
ok      internal/testenv        2.356s
ok      internal/trace  1.248s
ok      internal/trace/v2       24.299s
ok      internal/types/errors   3.744s
ok      internal/unsafeheader   1.019s
ok      internal/xcoff  1.013s
ok      internal/zstd   1.261s
ok      io      1.160s
ok      io/fs   1.134s
ok      io/ioutil       1.113s
ok      log     1.027s
ok      log/slog        1.254s
ok      log/slog/internal/benchmarks    0.971s
ok      log/slog/internal/buffer        0.835s
ok      maps    0.979s
ok      math    0.998s
ok      math/big        2.062s
ok      math/bits       0.911s
ok      math/cmplx      1.007s
ok      math/rand       1.140s
ok      math/rand/v2    1.393s
ok      mime    1.149s
ok      mime/multipart  1.952s
ok      mime/quotedprintable    1.263s
ok      net     7.682s
ok      net/http        5.270s
ok      net/http/cgi    2.347s
ok      net/http/cookiejar      1.540s
ok      net/http/fcgi   1.370s
ok      net/http/httptest       0.892s
ok      net/http/httptrace      0.979s
ok      net/http/httputil       1.622s
ok      net/http/internal       1.228s
ok      net/http/internal/ascii 1.013s
ok      net/http/pprof  6.209s
ok      net/mail        1.597s
ok      net/netip       1.930s
ok      net/rpc 1.000s
ok      net/rpc/jsonrpc 1.591s
ok      net/smtp        1.400s
ok      net/textproto   1.131s
ok      net/url 1.212s
ok      os      2.495s
ok      os/exec 5.227s
ok      os/exec/internal/fdtest 1.070s
ok      os/signal       4.687s
ok      os/user 1.019s
ok      path    1.218s
ok      path/filepath   2.573s
ok      plugin  1.147s
ok      reflect 2.019s
ok      regexp  1.283s
ok      regexp/syntax   1.354s
ok      runtime 296.434s
ok      runtime/cgo     0.873s
ok      runtime/coverage        0.958s
ok      runtime/debug   1.154s
ok      runtime/internal/atomic 0.871s
ok      runtime/internal/math   1.031s
ok      runtime/internal/sys    0.999s
ok      runtime/internal/wasitest       1.004s
ok      runtime/metrics 1.055s
ok      runtime/pprof   14.486s
ok      runtime/trace   1.199s
ok      slices  1.097s
ok      sort    0.985s
ok      strconv 1.147s
ok      strings 1.005s
ok      sync    1.860s
ok      sync/atomic     0.988s
ok      syscall 25.258s
ok      testing 2.404s
ok      testing/fstest  1.023s
ok      testing/iotest  1.250s
ok      testing/quick   0.937s
ok      testing/slogtest        1.163s
ok      text/scanner    0.916s
ok      text/tabwriter  1.102s
ok      text/template   1.275s
ok      text/template/parse     0.940s
ok      time    3.544s
ok      unicode 1.130s
ok      unicode/utf16   1.271s
ok      unicode/utf8    1.015s
ok      cmd/addr2line   4.100s
ok      cmd/api 3.786s
ok      cmd/asm/internal/asm    2.225s
ok      cmd/asm/internal/lex    0.950s
ok      cmd/cgo/internal/swig   1.220s
ok      cmd/cgo/internal/test   0.472s
ok      cmd/cgo/internal/testcarchive   1.094s
ok      cmd/cgo/internal/testcshared    1.423s
ok      cmd/cgo/internal/testerrors     175.135s
ok      cmd/cgo/internal/testfortran    2.254s
ok      cmd/cgo/internal/testgodefs     7.846s
ok      cmd/cgo/internal/testlife       13.992s
ok      cmd/cgo/internal/testnocgo      0.817s
ok      cmd/cgo/internal/testplugin     0.775s
ok      cmd/cgo/internal/testsanitizers 0.982s [no tests to run]
ok      cmd/cgo/internal/testshared     1.182s
ok      cmd/cgo/internal/testso 53.364s
ok      cmd/cgo/internal/teststdio      29.337s
Exception 0xc0000005 0x0 0x2d0daca3208 0x7ff6f66be723
PC=0x7ff6f66be723
signal arrived during external code execution

runtime.cgocall(0x7ff6f66be6a0, 0xc000063ee8)
        D:/file/gofile/gogit/go1/src/runtime/cgocall.go:157 +0x3e fp=0xc000063ec0 sp=0xc000063e88 pc=0x7ff6f65b567e
cmd/cgo/internal/testtls._Cfunc_getTLS()
        _cgo_gotypes.go:75 +0x51 fp=0xc000063ee8 sp=0xc000063ec0 pc=0x7ff6f66be1d1
cmd/cgo/internal/testtls.testTLS(0xc00004b6c0)
        D:/file/gofile/gogit/go1/src/cmd/cgo/internal/testtls/tls.go:25 +0xaa fp=0xc000063f68 sp=0xc000063ee8 pc=0x7ff6f66be34a
cmd/cgo/internal/testtls.TestTLS(0xc00004b6c0?)
        D:/file/gofile/gogit/go1/src/cmd/cgo/internal/testtls/tls_test.go:10 +0x13 fp=0xc000063f80 sp=0xc000063f68 pc=0x7ff6f66be0f3
testing.tRunner(0xc00004b6c0, 0x7ff6f672b8e0)
        D:/file/gofile/gogit/go1/src/testing/testing.go:1677 +0xf4 fp=0xc000063fc0 sp=0xc000063f80 pc=0x7ff6f6682f54
testing.(*T).Run.gowrap3()
        D:/file/gofile/gogit/go1/src/testing/testing.go:1743 +0x25 fp=0xc000063fe0 sp=0xc000063fc0 pc=0x7ff6f6683ee5
runtime.goexit({})
        D:/file/gofile/gogit/go1/src/runtime/asm_amd64.s:1695 +0x1 fp=0xc000063fe8 sp=0xc000063fe0 pc=0x7ff6f6620da1
created by testing.(*T).Run in goroutine 1
        D:/file/gofile/gogit/go1/src/testing/testing.go:1743 +0x48e

goroutine 1 gp=0xc00004a000 m=nil [chan receive]:
runtime.gopark(0xc00001e750?, 0xc00001e7d8?, 0x50?, 0xe7?, 0xf67008a0?)
        D:/file/gofile/gogit/go1/src/runtime/proc.go:402 +0xce fp=0xc000107998 sp=0xc000107978 pc=0x7ff6f65edb0e
runtime.chanrecv(0xc000068300, 0x0, 0x1)
        D:/file/gofile/gogit/go1/src/runtime/chan.go:583 +0x3cd fp=0xc000107a10 sp=0xc000107998 pc=0x7ff6f65b734d
runtime.chanrecv1(0x7ff6f6819940?, 0x7ff6f66f4f60?)
        D:/file/gofile/gogit/go1/src/runtime/chan.go:442 +0x12 fp=0xc000107a38 sp=0xc000107a10 pc=0x7ff6f65b6f72
testing.(*T).Run(0xc00004b520, {0x7ff6f671e3dd?, 0xc032e12d50?}, 0x7ff6f672b8e0)
        D:/file/gofile/gogit/go1/src/testing/testing.go:1744 +0x4a5 fp=0xc000107b30 sp=0xc000107a38 pc=0x7ff6f6683d25
testing.runTests.func1(0xc00004b520)
        D:/file/gofile/gogit/go1/src/testing/testing.go:2146 +0x37 fp=0xc000107b70 sp=0xc000107b30 pc=0x7ff6f6685db7
testing.tRunner(0xc00004b520, 0xc000107c70)
        D:/file/gofile/gogit/go1/src/testing/testing.go:1677 +0xf4 fp=0xc000107bb0 sp=0xc000107b70 pc=0x7ff6f6682f54
testing.runTests(0xc000006078, {0x7ff6f66dae00?, 0x1, 0x1}, {0x1?, 0x7ff6f666db73?, 0x7ff6f6819b20?})
        D:/file/gofile/gogit/go1/src/testing/testing.go:2144 +0x417 fp=0xc000107ca0 sp=0xc000107bb0 pc=0x7ff6f6685c97
testing.(*M).Run(0xc00006a140)
        D:/file/gofile/gogit/go1/src/testing/testing.go:2012 +0x68b fp=0xc000107ed0 sp=0xc000107ca0 pc=0x7ff6f66846ab
main.main()
        _testmain.go:47 +0x16c fp=0xc000107f50 sp=0xc000107ed0 pc=0x7ff6f66be64c
runtime.main()
        D:/file/gofile/gogit/go1/src/runtime/proc.go:271 +0x28b fp=0xc000107fe0 sp=0xc000107f50 pc=0x7ff6f65ed6eb
runtime.goexit({})
        D:/file/gofile/gogit/go1/src/runtime/asm_amd64.s:1695 +0x1 fp=0xc000107fe8 sp=0xc000107fe0 pc=0x7ff6f6620da1

goroutine 2 gp=0xc00004a680 m=nil [force gc (idle)]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
        D:/file/gofile/gogit/go1/src/runtime/proc.go:402 +0xce fp=0xc00004dfa8 sp=0xc00004df88 pc=0x7ff6f65edb0e
runtime.goparkunlock(...)
        D:/file/gofile/gogit/go1/src/runtime/proc.go:408
runtime.forcegchelper()
        D:/file/gofile/gogit/go1/src/runtime/proc.go:326 +0xb8 fp=0xc00004dfe0 sp=0xc00004dfa8 pc=0x7ff6f65ed978
runtime.goexit({})
        D:/file/gofile/gogit/go1/src/runtime/asm_amd64.s:1695 +0x1 fp=0xc00004dfe8 sp=0xc00004dfe0 pc=0x7ff6f6620da1
created by runtime.init.6 in goroutine 1
        D:/file/gofile/gogit/go1/src/runtime/proc.go:314 +0x1a

goroutine 3 gp=0xc00004a9c0 m=nil [GC sweep wait]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
        D:/file/gofile/gogit/go1/src/runtime/proc.go:402 +0xce fp=0xc00004ff80 sp=0xc00004ff60 pc=0x7ff6f65edb0e
runtime.goparkunlock(...)
        D:/file/gofile/gogit/go1/src/runtime/proc.go:408
runtime.bgsweep(0xc000018070)
        D:/file/gofile/gogit/go1/src/runtime/mgcsweep.go:277 +0x94 fp=0xc00004ffc8 sp=0xc00004ff80 pc=0x7ff6f65d6694
runtime.gcenable.gowrap1()
        D:/file/gofile/gogit/go1/src/runtime/mgc.go:203 +0x25 fp=0xc00004ffe0 sp=0xc00004ffc8 pc=0x7ff6f65cb045
runtime.goexit({})
        D:/file/gofile/gogit/go1/src/runtime/asm_amd64.s:1695 +0x1 fp=0xc00004ffe8 sp=0xc00004ffe0 pc=0x7ff6f6620da1
created by runtime.gcenable in goroutine 1
        D:/file/gofile/gogit/go1/src/runtime/mgc.go:203 +0x66

goroutine 4 gp=0xc00004ab60 m=nil [GC scavenge wait]:
runtime.gopark(0xc000018070?, 0x7ff6f6751900?, 0x1?, 0x0?, 0xc00004ab60?)
        D:/file/gofile/gogit/go1/src/runtime/proc.go:402 +0xce fp=0xc000061f78 sp=0xc000061f58 pc=0x7ff6f65edb0e
runtime.goparkunlock(...)
        D:/file/gofile/gogit/go1/src/runtime/proc.go:408
runtime.(*scavengerState).park(0x7ff6f6819c40)
        D:/file/gofile/gogit/go1/src/runtime/mgcscavenge.go:425 +0x49 fp=0xc000061fa8 sp=0xc000061f78 pc=0x7ff6f65d40e9
runtime.bgscavenge(0xc000018070)
        D:/file/gofile/gogit/go1/src/runtime/mgcscavenge.go:653 +0x3c fp=0xc000061fc8 sp=0xc000061fa8 pc=0x7ff6f65d467c
runtime.gcenable.gowrap2()
        D:/file/gofile/gogit/go1/src/runtime/mgc.go:204 +0x25 fp=0xc000061fe0 sp=0xc000061fc8 pc=0x7ff6f65cafe5
runtime.goexit({})
        D:/file/gofile/gogit/go1/src/runtime/asm_amd64.s:1695 +0x1 fp=0xc000061fe8 sp=0xc000061fe0 pc=0x7ff6f6620da1
created by runtime.gcenable in goroutine 1
        D:/file/gofile/gogit/go1/src/runtime/mgc.go:204 +0xa5

goroutine 5 gp=0xc00004b040 m=nil [finalizer wait]:
runtime.gopark(0xc000051e48?, 0x7ff6f65bee25?, 0x98?, 0x1?, 0x7ff6f671c280?)
        D:/file/gofile/gogit/go1/src/runtime/proc.go:402 +0xce fp=0xc000051e20 sp=0xc000051e00 pc=0x7ff6f65edb0e
runtime.runfinq()
        D:/file/gofile/gogit/go1/src/runtime/mfinal.go:194 +0x107 fp=0xc000051fe0 sp=0xc000051e20 pc=0x7ff6f65ca0c7
runtime.goexit({})
        D:/file/gofile/gogit/go1/src/runtime/asm_amd64.s:1695 +0x1 fp=0xc000051fe8 sp=0xc000051fe0 pc=0x7ff6f6620da1
created by runtime.createfing in goroutine 1
        D:/file/gofile/gogit/go1/src/runtime/mfinal.go:164 +0x3d
rax     0x2d1246f3200
rbx     0xc000063ee8
rcx     0x2d1246f31a0
rdx     0xc000063e78
rdi     0xc000064000
rsi     0xc000063ee8
rbp     0xff4bdff8b0
rsp     0xff4bdff848
r8      0x7ff6f681a580
r9      0x0
r10     0x38000496ba
r11     0x7ff6f6777fe0
r12     0x15
r13     0x7ff6f681ab40
r14     0xc00004b860
r15     0x0
rip     0x7ff6f66be723
rflags  0x10206
cs      0x33
fs      0x53
gs      0x2b
FAIL    cmd/cgo/internal/testtls        1.514s
ok      cmd/compile/internal/abt        1.004s
ok      cmd/compile/internal/amd64      0.883s
ok      cmd/compile/internal/base       0.986s
ok      cmd/compile/internal/compare    1.454s
ok      cmd/compile/internal/devirtualize       1.152s
ok      cmd/compile/internal/dwarfgen   3.616s
ok      cmd/compile/internal/importer   15.931s
ok      cmd/compile/internal/inline/inlheur     6.553s
ok      cmd/compile/internal/ir 1.217s
ok      cmd/compile/internal/logopt     3.729s
ok      cmd/compile/internal/loopvar    1.278s
ok      cmd/compile/internal/noder      1.098s
ok      cmd/compile/internal/reflectdata        1.255s [no tests to run]
ok      cmd/compile/internal/ssa        7.457s
ok      cmd/compile/internal/syntax     1.840s
ok      cmd/compile/internal/test       74.809s
ok      cmd/compile/internal/typecheck  7.164s
ok      cmd/compile/internal/types      1.037s
ok      cmd/compile/internal/types2     193.082s
ok      cmd/covdata     1.484s
ok      cmd/cover       36.052s
ok      cmd/dist        2.091s
ok      cmd/distpack    1.207s
ok      cmd/doc 3.743s
ok      cmd/fix 26.134s
vcs-test.golang.org rerouted to http://127.0.0.1:58758
https://vcs-test.golang.org rerouted to https://127.0.0.1:58759
go test proxy running at GOPROXY=http://127.0.0.1:58760/mod
--- FAIL: TestScript (239.62s)
    --- FAIL: TestScript/cgo_stale_precompiled (26.31s)
        script_test.go:132: 2023-11-27T13:07:07Z
        script_test.go:134: $WORK=D:\tmp\cmd-go-test-4234491150\tmpdir1896035024\cgo_stale_precompiled2670438122
        script_test.go:156:
            # Regression test for https://go.dev/issue/47215 and https://go.dev/issue/50183:
            # A mismatched $GOROOT_FINAL or missing $CC caused the C dependencies of the net
            # package to appear stale, and it could not be rebuilt due to a missing $CC. (0.000s)
            # This test may start with the runtime/cgo package already stale.
            # Explicitly rebuild it to ensure that it is cached.
            # (See https://go.dev/issue/50892.)
            #
            # If running in non-short mode, explicitly vary CGO_CFLAGS
            # as a control case (to ensure that our regexps do catch rebuilds). (1.674s)
            # https://go.dev/issue/50183: a mismatched GOROOT_FINAL caused net to be stale. (1.812s)
            # https://go.dev/issue/47215: a missing $(go env CC) caused the precompiled net
            # to be stale. But as of https://go.dev/cl/452457 the precompiled libraries are
            # no longer installed anyway! Since we're requiring a C compiler in order to
            # build and use cgo libraries in the standard library, we should make sure it
            # matches what's in the cache. (2.009s)
            > [!abscc] env CGO_ENABLED=1
            > [!abscc] [!GOOS:plan9] env PATH=''  # Guaranteed not to include $(go env CC)!
            > [!abscc] [GOOS:plan9] env path=''
            [condition not met]
            > [!abscc] ! go build -x runtime/cgo
            [stderr]
            WORK=D:\tmp\cmd-go-test-4234491150\tmpdir1896035024\cgo_stale_precompiled2670438122\tmp\go-build4050935761
        script_test.go:156: FAIL: testdata\script\cgo_stale_precompiled.txt:35: go build -x runtime/cgo: unexpected success
FAIL
FAIL    cmd/go  249.770s
ok      cmd/go/internal/auth    2.910s
ok      cmd/go/internal/cache   12.165s
ok      cmd/go/internal/cfg     1.271s [no tests to run]
ok      cmd/go/internal/envcmd  1.603s
ok      cmd/go/internal/fsys    5.274s
ok      cmd/go/internal/generate        1.196s
ok      cmd/go/internal/gover   1.242s
ok      cmd/go/internal/imports 0.961s
ok      cmd/go/internal/load    1.388s
ok      cmd/go/internal/lockedfile      3.155s
ok      cmd/go/internal/lockedfile/internal/filelock    1.824s
ok      cmd/go/internal/modfetch        1.297s
ok      cmd/go/internal/modfetch/codehost       45.791s
ok      cmd/go/internal/modfetch/zip_sum_test   1.176s
ok      cmd/go/internal/modindex        6.461s
ok      cmd/go/internal/modload 1.417s
ok      cmd/go/internal/mvs     1.257s
ok      cmd/go/internal/par     1.378s
ok      cmd/go/internal/str     1.342s
ok      cmd/go/internal/test    1.662s
ok      cmd/go/internal/toolchain       0.988s
ok      cmd/go/internal/vcs     1.771s
ok      cmd/go/internal/vcweb   1.191s
ok      cmd/go/internal/vcweb/vcstest   47.481s
ok      cmd/go/internal/web     1.837s
ok      cmd/go/internal/work    1.221s
ok      cmd/gofmt       2.610s
ok      cmd/internal/archive    48.020s
ok      cmd/internal/bootstrap_test     1.206s
ok      cmd/internal/buildid    1.821s
ok      cmd/internal/cov        17.449s
ok      cmd/internal/dwarf      1.518s
ok      cmd/internal/edit       1.145s
ok      cmd/internal/goobj      1.193s
ok      cmd/internal/moddeps    83.141s
ok      cmd/internal/notsha256  1.235s
ok      cmd/internal/obj        10.728s
ok      cmd/internal/obj/ppc64  6.910s
ok      cmd/internal/obj/riscv  2.472s
ok      cmd/internal/obj/s390x  1.092s
ok      cmd/internal/obj/x86    9.447s
ok      cmd/internal/objabi     7.929s
ok      cmd/internal/pkgpath    1.677s
ok      cmd/internal/pkgpattern 1.115s
ok      cmd/internal/quoted     1.108s
ok      cmd/internal/src        1.035s
ok      cmd/internal/test2json  1.659s
ok      cmd/link        94.932s
ok      cmd/link/internal/benchmark     1.011s
ok      cmd/link/internal/ld    78.074s
ok      cmd/link/internal/loader        1.502s
ok      cmd/nm  53.750s
ok      cmd/objdump     52.493s
ok      cmd/pack        23.757s
ok      cmd/pprof       15.338s
ok      cmd/trace       1.242s
ok      cmd/trace/v2    1.547s
ok      cmd/vet 44.700s
FAIL
go tool dist: Failed: exit status 1
</pre></details>