diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2014-01-20 11:53:21 -0800 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-01-22 19:22:18 +0100 |
commit | 5aee85ec23f5c28fdccd9bd9d6ac90882bda348e (patch) | |
tree | f0f1c296d492b584c9619e0b87c28e5c2d61155b /qtbase.pro | |
parent | 2a2936b335684e849d0999f282771a2f39922c75 (diff) |
Don't allow the QLibraryStore to be recreated during shutdown
When QtCore's global destructors are run, they delete the global
QLibraryStore qt_library_data and set the pointer to null. If something
happened to call QLibraryStore::instance() later, it would be recreated
and then weird things might happen. So prevent that from happening.
That usually cannot happen, since the only thing that can run after
QtCore global destructors are other QtCore global destructors or global
destructors from libraries that do not depend on QtCore. So we're
reasonably safe. There are two conditions in which something could run
after QLibraryStore::cleanup() and still try to access QLibraryStore:
1) indirect dependency, like a global destructor from a library that
doesn't depend on QtCore running code from another module that does.
2) static builds of Qt modules. In that case, the order of the global
destructors is totally arbitrary and we could get one from a module that
depends on QtCore running after QtCore's. That is the case from the bug
report.
Task-number: QTBUG-36294
Change-Id: Id199671275fd2535acf2d158857ce46b474e579b
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
Diffstat (limited to 'qtbase.pro')
0 files changed, 0 insertions, 0 deletions