Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.0, 6.1
-
None
Description
QMetaType::NeedsContstruction promises that you can memset the type to zero for initialization. However, we set that flag when QTypeInfo<T>::isComplex is true. For Q_PRIMTIVE_TYPE, that flag is false; however primitive types don't give the guarantee that you can memzero them (see discussion https://lists.qt-project.org/pipermail/development/2020-November/040546.html), only that they can be memcpy'd.