Go to file
Thiago Macieira 950b35cf97 Clear the current thread data for the main thread
This avoids crashes accessing deleted memory when creating a QObject
after the last QObject had been deleted, like a qDebug() in global
destructors.

==41000== Invalid read of size 4
==41000==    at 0x5F01ED5: bool QBasicAtomicOps<4>::ref<int>(int&) (qatomic_x86.h:208)
==41000==    by 0x5F01309: QBasicAtomicInteger<int>::ref() (qbasicatomic.h:147)
==41000==    by 0x5F24051: QThreadData::ref() (qthread.cpp:100)
==41000==    by 0x614A984: QObject::QObject(QObject*) (qobject.cpp:681)
==41000==  Address 0x6ee73f0 is 0 bytes inside a block of size 152 free'd
==41000==    at 0x4A0736C: operator delete(void*) (vg_replace_malloc.c:480)
==41000==    by 0x5F240BF: QThreadData::deref() (qthread.cpp:109)
==41000==    by 0x6113F6B: QCoreApplicationData::~QCoreApplicationData() (qcoreapplication.cpp:268)

The comment right above the change in qthread.cpp looks eerily similar
to the problem I'm trying to fix. However, the actual change that
introduced the change is not in the Qt public history, so we can't
know for sure what the problem was then.

Change-Id: I0dba895b041fe6cf81e6f8939ca85035cd00aad1
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-03-05 20:58:00 +01:00
bin syncqt: Use /usr/bin/env perl not /usr/bin/perl 2013-02-20 22:19:43 +01:00
config.tests Introducing the Qt Android port 2013-03-05 08:31:23 +01:00
dist QGraphicsView - emit signal when rubber band changes. 2013-02-26 13:31:45 +01:00
doc Doc: Various changes to global CSS files. 2013-02-28 17:14:54 +01:00
examples Compile fix when QT_NO_PRINTDIALOG is defined 2013-02-26 13:31:45 +01:00
lib Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
mkspecs Rename gcc-base-macx.conf to gcc-base-mac.conf and use it for iOS as well 2013-03-05 18:40:12 +01:00
qmake introduce QMAKE_LINK_O_FLAG 2013-03-02 10:45:54 +01:00
src Clear the current thread data for the main thread 2013-03-05 20:58:00 +01:00
tests Clear the current thread data for the main thread 2013-03-05 20:58:00 +01:00
tools Add the infrastructure to compile Qt with -Werror 2013-02-28 23:43:36 +01:00
util QLocale: Add some more languages and scripts 2013-03-05 12:18:30 +01:00
.gitattributes Update the git-archive export options 2012-09-07 15:39:31 +02:00
.gitignore Long live QLockFile 2013-03-05 06:26:33 +01:00
.qmake.conf don't auto-install example sources by default for all modules 2012-12-03 15:56:28 +01:00
.tag Update the git-archive export options 2012-09-07 15:39:31 +02:00
configure Disable AVX for the whole Apple Clang 3.x series, not just 3.0 2013-03-05 18:39:35 +01:00
configure.bat Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
header.BSD Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
header.FDL Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
header.LGPL Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
header.LGPL-ONLY Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
INSTALL fix links in INSTALL 2012-10-10 08:45:22 +02:00
LGPL_EXCEPTION.txt Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
LICENSE.FDL Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
LICENSE.GPL Add the LICENSE.GPL file to the module referenced from license headers 2012-05-20 22:41:08 +02:00
LICENSE.LGPL Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
LICENSE.PREVIEW.COMMERCIAL Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
qtbase.pro create tool pri file for syncqt 2013-02-11 18:00:12 +01:00
sync.profile Add a new static lib and module for OpenGL extensions 2013-02-26 16:27:39 +01:00