sync/atomic: compare and swap of inconsistently typed values with uninitialized Value #52612
Labels
FrozenDueToAge
NeedsFix
The path to resolution is known, but the work has not been done.
release-blocker
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes. 1.18 and tip on play. Not in 1.17.9. Also
docker run golang:1.18.1
.This does appear to be a regression from 3a0cd11. In
CompareAndSwap
it's not checking againstfirstStoreInProgress
.What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
https://go.dev/play/p/6a28XhlK8iQ
Sometimes it will hit on go.dev/play, more reliably reproduced by running locally.
I can avoid the problem by storing an initial value:
var av atomic.Value + av.Store(1)
What did you expect to see?
Successful program execution.
What did you see instead?
The text was updated successfully, but these errors were encountered: