Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
6.2.2
-
e297e80fd0ec6ce4c97ee1b40426c76377b45ecc (qt/qtbase/dev)
Description
There's really no reason for it not to be. But when I change the ctor argument in https://codereview.qt-project.org/c/qt/qtbase/+/385125/2/tests/auto/corelib/tools/qvarlengtharray/tst_qvarlengtharray.cpp#413 to 2, the size() after the failed append() is 0.
Looks like reallocate() greedily sets this->ptr to newPtr before moving stuff over. It should wait with the update of *this until the elements have successfully moved over.