qt6-bb10/tests/auto/corelib/thread/qatomicinteger
Marc Mutz f647375275 Fix signed integer overflows in tst_QAtomicInteger
Signed integer overflows and underflows are undefined
behavior. A test that invokes UB tests nothing, because
the standard permits any outcome.

Fix by guarding the respective operations so
they are not executed if they would overflow
or underflow.

Change-Id: I40354ee88f40e4b47b70eac7790dc3a79ac70a57
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-03-10 07:17:55 +00:00
..
char Add missing fetchAndXxx methods to atomic classes based on std::atomic 2015-03-05 00:05:00 +00:00
char16_t Add missing fetchAndXxx methods to atomic classes based on std::atomic 2015-03-05 00:05:00 +00:00
char32_t Add missing fetchAndXxx methods to atomic classes based on std::atomic 2015-03-05 00:05:00 +00:00
gcc Add missing fetchAndXxx methods to atomic classes based on std::atomic 2015-03-05 00:05:00 +00:00
int Add missing fetchAndXxx methods to atomic classes based on std::atomic 2015-03-05 00:05:00 +00:00
long Add missing fetchAndXxx methods to atomic classes based on std::atomic 2015-03-05 00:05:00 +00:00
no-cxx11 Make the C++11 atomic support the default, if available 2015-10-16 18:52:00 +00:00
qlonglong Add missing fetchAndXxx methods to atomic classes based on std::atomic 2015-03-05 00:05:00 +00:00
qptrdiff Add missing fetchAndXxx methods to atomic classes based on std::atomic 2015-03-05 00:05:00 +00:00
quintptr Add missing fetchAndXxx methods to atomic classes based on std::atomic 2015-03-05 00:05:00 +00:00
qulonglong Add missing fetchAndXxx methods to atomic classes based on std::atomic 2015-03-05 00:05:00 +00:00
schar Add missing fetchAndXxx methods to atomic classes based on std::atomic 2015-03-05 00:05:00 +00:00
short Add missing fetchAndXxx methods to atomic classes based on std::atomic 2015-03-05 00:05:00 +00:00
uchar Add missing fetchAndXxx methods to atomic classes based on std::atomic 2015-03-05 00:05:00 +00:00
uint Add missing fetchAndXxx methods to atomic classes based on std::atomic 2015-03-05 00:05:00 +00:00
ulong Add missing fetchAndXxx methods to atomic classes based on std::atomic 2015-03-05 00:05:00 +00:00
ushort Add missing fetchAndXxx methods to atomic classes based on std::atomic 2015-03-05 00:05:00 +00:00
wchar_t Add missing fetchAndXxx methods to atomic classes based on std::atomic 2015-03-05 00:05:00 +00:00
qatomicinteger.pri Make the C++11 atomic support the default, if available 2015-10-16 18:52:00 +00:00
qatomicinteger.pro Make the C++11 atomic support the default, if available 2015-10-16 18:52:00 +00:00
tst_qatomicinteger.cpp Fix signed integer overflows in tst_QAtomicInteger 2016-03-10 07:17:55 +00:00