Ptr member of ManagedStaticBase is now atomic.
In ManagedStaticBase::RegisterManagedStatic we have such code:
void *Tmp = Creator();
Ptr.store(Tmp, std::memory_order_release);
DeleterFn = Deleter;
// Add to list of managed statics.
Next = StaticList;
StaticList = this;
StaticList is not atomic and not guarded by any fence.
The same applies to the members DeleterFn and Next.
Doesn’t it seem reasonable to change the code to
DeleterFn = Deleter;
// Add to list of managed statics.
Next = StaticList;
StaticList = this;
Ptr.store(Tmp, std::memory_order_release);