Details
-
Task
-
Resolution: Unresolved
-
P2: Important
-
None
-
None
-
None
-
e4ef644af (tqtc/lts-6.5), 6b77b43b1 (6.10), 2b0ec367c (6.10), ae5dd04b5 (6.9), b9a9f4dee (6.9), 13780cb96 (tqtc/lts-6.8), 218e91000 (tqtc/lts-6.8), bbf1d6cb9 (tqtc/lts-6.5), b2f359a0d (tqtc/lts-6.5), 3f61f7362 (dev), 02adcda48 (6.10)
-
Foundation Sprint 131, Foundation Sprint 132, Foundation Sprint 133
Description
QBasicAtomic inherits the weird pre-C++20 initialization semantics from std::atomic. Cf. https://wiki.qt.io/Things_To_Look_Out_For_In_Reviews#QBasicAtomic
Review and, where needed, fix QBasicAtomic* initialization:
- we must not call the default constructor
- better not even rely on zero-initialization, either (peppe thinks it may also be unsafe)
- use QAtomic* for non-static/thread-local variables default-constructed atomics
- otherwise, make sure the variables are initialized with Q_BASIC_ATOMIC_INITIALIZER
Attachments
Gerrit Reviews
For Gerrit Dashboard: QTBUG-137465 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
658817,1 | QArrayData: fix potential UB in QBasicAtomic initialization | 6.9 | qt/qtbase | Status: NEW | 0 | 0 |