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

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

Issue created automatically to collect these failures.

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

    === RUN   TestScript/cover_pkgall_imports
    === PAUSE TestScript/cover_pkgall_imports
    === CONT  TestScript/cover_pkgall_imports
        script_test.go:135: 2024-09-05T15:30:01Z
        script_test.go:137: $WORK=/home/swarming/.swarming/w/ir/x/t/cmd-go-test-1520434874/tmpdir410918943/cover_pkgall_imports3152574167
        script_test.go:159: 
            PATH=/home/swarming/.swarming/w/ir/x/t/cmd-go-test-1520434874/tmpdir410918943/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 [:4294969391] with capacity 33271
            
            goroutine 1 gp=0xc0000081c0 m=0 mp=0x814900 [running]:
            panic({0x645900?, 0xc0000180f0?})
            	/home/swarming/.swarming/w/ir/x/w/goroot/src/runtime/panic.go:804 +0x2a5 fp=0xc0000df1b8 sp=0xc0000df108 pc=0x4c49a5
            runtime.goPanicSliceAcap(0x10000082f, 0x81f7)
            	/home/swarming/.swarming/w/ir/x/w/goroot/src/runtime/panic.go:141 +0x97 fp=0xc0000df1f8 sp=0xc0000df1b8 pc=0x45c917
            internal/coverage/cfile.(*emitState).VisitFuncs(0xc0000bc1e0, 0xc0000122a0)
            	/home/swarming/.swarming/w/ir/x/w/goroot/src/internal/coverage/cfile/emit.go:478 +0xeb0 fp=0xc0000df450 sp=0xc0000df1f8 pc=0x5c6030
            internal/coverage/encodecounter.(*CoverageDataWriter).writeCounters(0xc000014190, {0x69cbc0, 0xc0000bc1e0}, 0xc0000a2060)
    ...
            	/home/swarming/.swarming/w/ir/x/w/goroot/src/runtime/mfinal.go:193 +0x27e fp=0xc000069fe0 sp=0xc000069e20 pc=0x42431e
            runtime.goexit({})
            	/home/swarming/.swarming/w/ir/x/w/goroot/src/runtime/asm_amd64.s:1700 +0x1 fp=0xc000069fe8 sp=0xc000069fe0 pc=0x4cfca1
            created by runtime.createfing in goroutine 1
            	/home/swarming/.swarming/w/ir/x/w/goroot/src/runtime/mfinal.go:163 +0xab
            FAIL	example.com/cov/onlytest	0.136s
            ok  	example.com/cov/withtest	0.462s	coverage: 16.3% of statements in all
            FAIL
        script_test.go:159: FAIL: testdata/script/cover_pkgall_imports.txt:13: go test -coverpkg=all ./...: exit status 1
    --- FAIL: TestScript/cover_pkgall_imports (84.29s)


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