Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
5.5.0 RC
-
None
-
-
7833f4852ab4c44a1fae75cfb1221e19a7b3256c
Description
Running this simple program on iOS 8 will crash on an iPad 3.
Has 32bit A5X armv7 chip
#include <QAtomicInteger> #include <QtQml/qqmldebug.h> #include <QDebug> int main(int, char *[]) { #if defined(Q_ATOMIC_INT64_IS_SUPPORTED) static QAtomicInteger<quint64> m_curId = QAtomicInteger<quint64>(1); #else static QAtomicInteger<quint32> m_curId = QAtomicInteger<quint32>(1); #endif quint64 id = m_curId.fetchAndAddOrdered(1); qDebug() << id; return 0; }
Not including qqmldebug.h makes the crash go away.
It runs fine on an iPhone 6 (arm64).
call stack:
#0 0x0002a82e in unsigned long long QBasicAtomicOps<8>::fetchAndAddRelaxed<unsigned long long>(unsigned long long&, QAtomicAdditiveType<unsigned long long>::AdditiveT) at /Users/mike/Developers/build-QAtomicIntTest-iphoneos_clang_Qt_5_5_0_qt5_ios-Debug/../qt5_ios/qtbase/include/QtCore/../../../../qt5/qtbase/src/corelib/arch/qatomic_armv6.h:650 #1 0x0002a7fc in unsigned long long QGenericAtomicOps<QBasicAtomicOps<8> >::fetchAndAddOrdered<unsigned long long>(unsigned long long&, QAtomicAdditiveType<unsigned long long>::AdditiveT) [inlined] at /Users/mike/Developers/build-QAtomicIntTest-iphoneos_clang_Qt_5_5_0_qt5_ios-Debug/../qt5_ios/qtbase/include/QtCore/../../../../qt5/qtbase/src/corelib/thread/qgenericatomic.h:253 #2 0x0002a7ec in QBasicAtomicInteger<unsigned long long>::fetchAndAddOrdered(unsigned long long) at /Users/mike/Developers/build-QAtomicIntTest-iphoneos_clang_Qt_5_5_0_qt5_ios-Debug/../qt5_ios/qtbase/include/QtCore/../../../../qt5/qtbase/src/corelib/thread/qbasicatomic.h:175 #3 0x0002a6c4 in main at /Users/mike/Developers/QAtomicIntTest/main.cpp:12