Repository: go
Issue: cmd/go: TestScript/cover_atomic_pkgall failures
Labels: NeedsInvestigation

```
#!watchflakes
default <- pkg == "cmd/go" && test == "TestScript/cover_atomic_pkgall"
```

Issue created automatically to collect these failures.

Example ([log](https://ci.chromium.org/b/8732602684851905153)):

    === RUN   TestScript/cover_atomic_pkgall
    === PAUSE TestScript/cover_atomic_pkgall
    === CONT  TestScript/cover_atomic_pkgall
        script_test.go:139: 2024-10-31T01:45:29Z
        script_test.go:141: $WORK=/home/swarming/.swarming/w/ir/x/t/cmd-go-test-997808213/tmpdir2031948626/cover_atomic_pkgall1783398869
        script_test.go:163: 
            PATH=/home/swarming/.swarming/w/ir/x/t/cmd-go-test-997808213/tmpdir2031948626/testbin:/home/swarming/.swarming/w/ir/x/w/goroot/bin:/home/swarming/.swarming/w/ir/x/w/goroot/bin:/home/swarming/.swarming/w/ir/x/w/goroot/bin:/home/swarming/.swarming/w/ir/cache/tools/bin:/home/swarming/.swarming/w/ir/bbagent_utility_packages:/home/swarming/.swarming/w/ir/bbagent_utility_packages/bin:/home/swarming/.swarming/w/ir/cipd_bin_packages:/home/swarming/.swarming/w/ir/cipd_bin_packages/bin:/home/swarming/.swarming/w/ir/cipd_bin_packages/cpython3:/home/swarming/.swarming/w/ir/cipd_bin_packages/cpython3/bin:/home/swarming/.swarming/w/ir/cache/cipd_client:/home/swarming/.swarming/w/ir/cache/cipd_client/bin:/home/swarming/.swarming/cipd_cache/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
            HOME=/no-home
            CCACHE_DISABLE=1
            GOARCH=amd64
    ...
            panic: runtime error: slice bounds out of range [:4294972028] with capacity 15336
            
            goroutine 1 gp=0xc000004380 m=0 mp=0x90aac0 [running]:
            panic({0x726360?, 0xc0001f6078?})
            	/home/swarming/.swarming/w/ir/x/w/goroot/src/runtime/panic.go:806 +0x168 fp=0xc00002ebc8 sp=0xc00002eb18 pc=0x4aa5e8
            runtime.goPanicSliceAcap(0x10000127c, 0x3be8)
            	/home/swarming/.swarming/w/ir/x/w/goroot/src/runtime/panic.go:141 +0x74 fp=0xc00002ec08 sp=0xc00002ebc8 pc=0x46f834
            internal/coverage/cfile.(*emitState).VisitFuncs(0xc0001c8140, 0xc0001a22b8)
            	/home/swarming/.swarming/w/ir/x/w/goroot/src/internal/coverage/cfile/emit.go:478 +0x11c8 fp=0xc00002ee88 sp=0xc00002ec08 pc=0x66a368
            internal/coverage/encodecounter.(*CoverageDataWriter).writeCounters(0xc0001c6190, {0x781640, 0xc0001c8140}, 0xc0001b4080)
    ...
            runtime.runfinq()
            	/home/swarming/.swarming/w/ir/x/w/goroot/src/runtime/mfinal.go:193 +0x145 fp=0xc00007dfe0 sp=0xc00007de20 pc=0x450305
            runtime.goexit({})
            	/home/swarming/.swarming/w/ir/x/w/goroot/src/runtime/asm_amd64.s:1700 +0x1 fp=0xc00007dfe8 sp=0xc00007dfe0 pc=0x4b1a01
            created by runtime.createfing in goroutine 1
            	/home/swarming/.swarming/w/ir/x/w/goroot/src/runtime/mfinal.go:163 +0x3d
            FAIL	x	0.181s
            FAIL
        script_test.go:163: FAIL: testdata/script/cover_atomic_pkgall.txt:10: go test -coverpkg=all -race x: exit status 1
    --- FAIL: TestScript/cover_atomic_pkgall (77.73s)


— [watchflakes](https://go.dev/wiki/Watchflakes)