qt5base-lts/tests/auto/corelib/tools
Marc Mutz 6716fe8cfd QVector: fix use of invalid iterators in removeAll()
The c2m() function which converts a const_iterator into an iterator
is a broken concept for an implicitly shared container such as
QVector, because the act of calling begin() as the starting
point already detaches and invalidates the c2m argument.

This could be fixed in c2m, but the bug wasn't even in c2m,
but in removeAll(), which called end() before c2m, so the c2m
argument was already invalidated when entering c2m.

The solution is to store the positions as indices instead of
iterators before calling the first detaching function.

Task-number: QTBUG-44592
Change-Id: I66cf4f1277e71148a4d5b5bbfb6a3369ad02db68
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-02-22 13:45:50 +00:00
..
collections Update license headers and add new license files 2014-09-24 12:26:19 +02:00
qalgorithms Update license headers and add new license files 2014-09-24 12:26:19 +02:00
qarraydata Update license headers and add new license files 2014-09-24 12:26:19 +02:00
qarraydata_strictiterators Make sure all containers compile in strict-iterator mode 2014-02-22 04:38:01 +01:00
qbitarray Update license headers and add new license files 2014-09-24 12:26:19 +02:00
qbytearray Android: Fix QByteArray test 2015-01-06 16:44:30 +01:00
qbytearraylist Update license headers and add new license files 2014-09-24 12:26:19 +02:00
qbytearraymatcher Update license headers and add new license files 2014-09-24 12:26:19 +02:00
qbytedatabuffer Update license headers and add new license files 2014-09-24 12:26:19 +02:00
qcache Update license headers and add new license files 2014-09-24 12:26:19 +02:00
qchar Android: Fix QChar test 2015-01-06 16:44:32 +01:00
qcollator Android: Fix QCollator test 2015-01-06 16:44:34 +01:00
qcommandlineparser Android: Fix QCommandLineParser test 2015-01-06 16:44:36 +01:00
qcontiguouscache Update license headers and add new license files 2014-09-24 12:26:19 +02:00
qcryptographichash Android: Fix QCryptographicHash test 2015-01-06 16:44:38 +01:00
qdate Update license headers and add new license files 2014-09-24 12:26:19 +02:00
qdatetime [QDateTime] ISO Time zone designators can be [+-]HH 2014-12-30 23:56:01 +01:00
qeasingcurve Update license headers and add new license files 2014-09-24 12:26:19 +02:00
qelapsedtimer Update license headers and add new license files 2014-09-24 12:26:19 +02:00
qexplicitlyshareddatapointer Update license headers and add new license files 2014-09-24 12:26:19 +02:00
qfreelist Update license headers and add new license files 2014-09-24 12:26:19 +02:00
qhash Update license headers and add new license files 2014-09-24 12:26:19 +02:00
qhash_strictiterators Make sure all containers compile in strict-iterator mode 2014-02-22 04:38:01 +01:00
qline Update license headers and add new license files 2014-09-24 12:26:19 +02:00
qlinkedlist Update license headers and add new license files 2014-09-24 12:26:19 +02:00
qlist Update license headers and add new license files 2014-09-24 12:26:19 +02:00
qlist_strictiterators Make sure all containers compile in strict-iterator mode 2014-02-22 04:38:01 +01:00
qlocale Update license headers and add new license files 2014-09-24 12:26:19 +02:00
qmap Update license headers and add new license files 2014-09-24 12:26:19 +02:00
qmap_strictiterators Make sure all containers compile in strict-iterator mode 2014-02-22 04:38:01 +01:00
qmargins Update license headers and add new license files 2014-09-24 12:26:19 +02:00
qmessageauthenticationcode Update license headers and add new license files 2014-09-24 12:26:19 +02:00
qpair Update license headers and add new license files 2014-09-24 12:26:19 +02:00
qpoint Update license headers and add new license files 2014-09-24 12:26:19 +02:00
qpointf Update license headers and add new license files 2014-09-24 12:26:19 +02:00
qqueue Update license headers and add new license files 2014-09-24 12:26:19 +02:00
qrect Update license headers and add new license files 2014-09-24 12:26:19 +02:00
qregexp Update license headers and add new license files 2014-09-24 12:26:19 +02:00
qregularexpression Update license headers and add new license files 2014-09-24 12:26:19 +02:00
qringbuffer Update license headers and add new license files 2014-09-24 12:26:19 +02:00
qscopedpointer Update license headers and add new license files 2014-09-24 12:26:19 +02:00
qscopedvaluerollback Update license headers and add new license files 2014-09-24 12:26:19 +02:00
qset Update license headers and add new license files 2014-09-24 12:26:19 +02:00
qsharedpointer Fix QSharedPointer::create and QEnableSharedFromThis 2015-01-21 08:23:59 +01:00
qsize Update license headers and add new license files 2014-09-24 12:26:19 +02:00
qsizef Update license headers and add new license files 2014-09-24 12:26:19 +02:00
qstl Update license headers and add new license files 2014-09-24 12:26:19 +02:00
qstring tst_qstring_mac: Correct memory management. 2015-01-20 05:47:16 +01:00
qstring_no_cast_from_bytearray Update license headers and add new license files 2014-09-24 12:26:19 +02:00
qstringbuilder Update license headers and add new license files 2014-09-24 12:26:19 +02:00
qstringiterator Update license headers and add new license files 2014-09-24 12:26:19 +02:00
qstringlist Update license headers and add new license files 2014-09-24 12:26:19 +02:00
qstringmatcher Update license headers and add new license files 2014-09-24 12:26:19 +02:00
qstringref Make QStringRef::right() consistent with QString::right() 2014-10-14 11:32:55 +02:00
qtextboundaryfinder Android: Fix QTextBoundaryFinder test 2015-01-09 15:41:27 +01:00
qtime Update license headers and add new license files 2014-09-24 12:26:19 +02:00
qtimeline Update license headers and add new license files 2014-09-24 12:26:19 +02:00
qtimezone Update license headers and add new license files 2014-09-24 12:26:19 +02:00
qvarlengtharray Update license headers and add new license files 2014-09-24 12:26:19 +02:00
qvector QVector: fix use of invalid iterators in removeAll() 2015-02-22 13:45:50 +00:00
qvector_strictiterators Make sure all containers compile in strict-iterator mode 2014-02-22 04:38:01 +01:00
qversionnumber QVersionNumber: test more version numbers 2015-01-08 01:46:41 +01:00
tools.pro Long live QByteArrayList! 2014-08-09 09:01:41 +02:00