Details
-
Task
-
Resolution: Unresolved
-
P2: Important
-
None
-
None
Description
PendingSourceLocationId is currently an alias for QAtomicInt. There's no use of other synchronisation around this code, so this looks highly suspicious.
QAtomicInt has a copy ctor, but we want to get rid of it, because it allows precisely this kind of code to compile. The generated code will be awful, because contemporary compilers tend not to optimize around atomics, even forgetting everything they know about memory upon an atomic operation (they're synchronisation points). On x86, it's not as bad, but on arm-32, the assembly should be horrible with all those extra fences.
I have a strong suspicion that this could just be an int (or a strong typedef for int), but I lack the overview over this part of the code base to say for sure.
Attachments
Issue Links
- blocks
-
QTBUG-103835 Add opt-in mechanism to disable QAtomic<T> copy ctor/assignment operators
-
- Open
-