I want to set a larger maxTinySize and see what the runtime will behave. Then I made these changes to the sources of go1.16.6:
Building Go cmd/dist using /usr/local/go. (go1.16 linux/amd64)
Building Go toolchain1 using /usr/local/go.
Building Go bootstrap cmd/go (go_bootstrap) using Go toolchain1.
Building Go toolchain2 using go_bootstrap and Go toolchain1.
panic: sync: WaitGroup is reused before previous Wait has returned
goroutine 1 [running]:
sync.(*WaitGroup).Wait(0xc0003a40f4)
/mnt/down/ework/src/go2/go/src/sync/waitgroup.go:132 +0xae
cmd/go/internal/work.(*Builder).Do(0xc000354d20, 0x910750, 0xc00008c000, 0xc00030e3c0)
/mnt/down/ework/src/go2/go/src/cmd/go/internal/work/exec.go:207 +0x559
cmd/go/internal/work.InstallPackages(0x910750, 0xc00008c000, 0xc0000a8050, 0x4, 0x4, 0xc00026ab00, 0x4, 0x4)
/mnt/down/ework/src/go2/go/src/cmd/go/internal/work/build.go:724 +0xc3e
cmd/go/internal/work.runInstall(0x910750, 0xc00008c000, 0xae6480, 0xc0000a8050, 0x4, 0x4)
/mnt/down/ework/src/go2/go/src/cmd/go/internal/work/build.go:632 +0x38c
main.main()
/mnt/down/ework/src/go2/go/src/cmd/go/main.go:195 +0x70c
go tool dist: FAILED: /mnt/down/ework/src/go2/go/pkg/tool/linux_amd64/go_bootstrap install -gcflags=all=-ldflags=all= -i cmd/asm cmd/cgo cmd/compile cmd/link: exit status 2
Am I missing something? I would be highly appreciated it if anyone could give me a direction. Thanks a lot :-D