Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
5.12.0, 5.13.0
-
None
-
-
8abbbb4c482c32cd5342f5f8576cee8cbacc3737 (qt/qtbase/5.13)
Description
Calling QVector::fill() doesn't detach the copied vector from its source:
#include <QVector> #include <QDebug> int main() { QVector<int> test = { 1, 2, 3 }; QVector<int> copy = test; copy.fill(42); qWarning() << test; }
Output:
QVector(42, 42, 42)
Valgrind doesn't report any issues.
Attachments
For Gerrit Dashboard: QTBUG-77058 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
267920,2 | Fix regression causing QVector::fill w/ same size to not detach | 5.13 | qt/qtbase | Status: MERGED | +2 | 0 |