qt6-bb10/tests/auto/corelib/tools/qvector
Marc Mutz 67391f0a57 Fix aliasing problem in QVector::removeAll()
Since removeAll() takes its argument by cref, if passing a reference
to an element of the container to removeAll(), the element may be
deleted (overwritten) by anyother value, leading to UB.

Add a test that actually happens to fail for me without the patch,
even though that might not be guaranteed (we may invoke UB).

Change-Id: If8c795113aeb515f4a9bdf1e072395b932295667
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-11-28 21:58:50 +00:00
..
.gitignore Moving relevant tests to corelib/tools 2011-09-01 13:07:23 +02:00
qvector.pro Use qtConfig throughout in qtbase 2016-08-19 04:28:05 +00:00
tst_qvector.cpp Fix aliasing problem in QVector::removeAll() 2017-11-28 21:58:50 +00:00