Data race in ruspiro-singleton
High severity
GitHub Reviewed
Published
Aug 25, 2021
to the GitHub Advisory Database
•
Updated Jan 27, 2023
Description
Published by the National Vulnerability Database
Aug 8, 2021
Reviewed
Aug 18, 2021
Published to the GitHub Advisory Database
Aug 25, 2021
Last updated
Jan 27, 2023
Singleton<T>is meant to be a static object that can be initialized lazily. Inorder to satisfy the requirement that
staticitems must implementSync,Singletonimplemented bothSyncandSendunconditionally.This allows for a bug where non-
Synctypes such asCellcan be used insingletons and cause data races in concurrent programs.
The flaw was corrected in commit
b0d2bd20eby adding trait bounds, requiringthe contaiend type to implement
Sync.References