Details
-
Bug
-
Resolution: Done
-
P2: Important
-
4.5.2, 4.5.3, 4.6.0
-
None
-
All
-
480b395bd652a4ac6e3f262bd99a045dff95c4ac
Description
QVector<A> a; a.resize(2); // has 2 default-constructed values QVector<A> b(a); // shared array, copy-on-write semantics b.reserve(1); // heap corruption during realloc for new data copy
Yes, the caller should probably not do this, but it's a bug nonetheless since calling reserve() on an unshared vector is effectively a no-op.