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.
Attachments
For Gerrit Dashboard: QTBUG-99039 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
385305,11 | QVarLengthArray: make reallocation strongly exception safe | dev | qt/qtbase | Status: MERGED | +2 | 0 |
411049,3 | QVarLengthArray: Move unique_ptr<void, free_deleter> to QVLABaseBase | dev | qt/qtbase | Status: MERGED | +2 | 0 |
411218,2 | QVarLengthArray: Move unique_ptr<void, free_deleter> to QVLABaseBase | 6.3 | qt/qtbase | Status: MERGED | +2 | 0 |