sync: need a way to guarantee that WaitGroup.state1 fields are always 4-bytes aligned #27577
Labels
compiler/runtime
Issues related to the Go compiler and/or runtime.
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
I have noticed and am glad that the suggestion mentioned in #19149 is adopted. But I feel the current new implementation is still not perfect.
The current implementation assumes that the
WaitGroup.state1
field is always 4-bytes aligned, but I can't find any such guarantee is written down in any official Go documentation.So I suggest that we should add a method like the following for
*WaitGroup
. The method will never be called, it just gives compilers a hint that theWaitGroup.state1
field needs to be 4-bytes aligned.The text was updated successfully, but these errors were encountered: