You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ go version
go version devel go1.20-fadd77c05b Wed Dec 21 20:18:10 2022 +0000 linux/amd64
Does this issue reproduce with the latest release?
Yes. In fact it seems to go back quite a ways (I tried with older releases back to 1.8, which also seems to have this problem, then eventually gave up).
What operating system and processor architecture are you using (go env)?
linux/amd64
What did you do?
$ GOMAXPROCS=1 go test -covermode=atomic sync/atomic
What did you expect to see?
Either a test run or an error of some sort.
What did you see instead?
Go command crashes after running out of stack space, e.g.
Similar deal with 1.19. For much older releases it appears we get into some sort of infinite loop? Not sure exactly (but not sure it matters either). It seems likely that we're trying to build a version of sync/atomic that imports itself.
Looking at the code in cmd/go, it is clear that there is code that tries to prevent this scenario, but I think what's going on here is that the existing code is focused too much on the case where sync/atomic is added in as a dependency, as opposed to being the thing called out on the command line as the test target.
The text was updated successfully, but these errors were encountered:
thanm
added
the
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
label
Dec 22, 2022
dmitshur
added
NeedsFix
The path to resolution is known, but the work has not been done.
and removed
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
labels
Jan 9, 2023
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes. In fact it seems to go back quite a ways (I tried with older releases back to 1.8, which also seems to have this problem, then eventually gave up).
What operating system and processor architecture are you using (
go env
)?linux/amd64
What did you do?
What did you expect to see?
Either a test run or an error of some sort.
What did you see instead?
Go command crashes after running out of stack space, e.g.
Similar deal with 1.19. For much older releases it appears we get into some sort of infinite loop? Not sure exactly (but not sure it matters either). It seems likely that we're trying to build a version of
sync/atomic
that imports itself.Looking at the code in
cmd/go
, it is clear that there is code that tries to prevent this scenario, but I think what's going on here is that the existing code is focused too much on the case wheresync/atomic
is added in as a dependency, as opposed to being the thing called out on the command line as the test target.The text was updated successfully, but these errors were encountered: