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
Concurrency: fix UB in DefaultActor initialization (#40263)
This fixes a latent UB instance in the `DefaultActor` implementation
that has haunted the Windows target. The shared constructor for the
type caused an errant typo that happened to compile which introduced
UB but happened to work for the non-Windows cases. This happened to
work for the other targets as `swift::atomic` had a `std::atomic` at
on most configurations, and the C delegate for the Actor initializer
happened to overlap and initialize the memory properly. The Windows
case used an inline pointer width value but would be attempted to be
initialized as a `std::atomic`. Relying on the overlap is unsafe to
assume, and we should use the type's own constructor which delegates
appropriately.
0 commit comments