[SCM] qtbase packaging branch, experimental, updated. debian/5.7.1+dfsg-3

Dmitry Shachnev mitya57 at moszumanska.debian.org
Tue Jan 24 10:49:28 UTC 2017


Gitweb-URL: http://git.debian.org/?p=pkg-kde/qt/qtbase.git;a=commitdiff;h=00dbeff

The following commit has been merged in the experimental branch:
commit 00dbeffd7456b5981bae412308483df144b71b6f
Author: Dmitry Shachnev <mitya57 at gmail.com>
Date:   Wed Jan 11 18:13:33 2017 +0300

    Backport change to stop unloading plugins in QPluginLoader and QFactoryLoader.
    
    Closes: #845662.
---
 debian/changelog                           |  2 +
 debian/patches/series                      |  1 +
 debian/patches/stop_unloading_plugins.diff | 61 ++++++++++++++++++++++++++++++
 3 files changed, 64 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index c1782e8..ec381b8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,6 +5,8 @@ qtbase-opensource-src (5.7.1+dfsg-3) UNRELEASED; urgency=medium
     (fix_accessibility_crash.diff; closes: #834750).
   * Backport upstream fix to make QGtk3Dialog not crash on Wayland
     (closes: #850746).
+  * Backport upstream change to stop unloading plugins in QPluginLoader
+    and QFactoryLoader (stop_unloading_pluings.diff; closes: #845662).
 
  -- Debian Qt/KDE Maintainers <debian-qt-kde at lists.debian.org>  Wed, 04 Jan 2017 22:39:02 +0300
 
diff --git a/debian/patches/series b/debian/patches/series
index 29be622..d51af60 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -5,6 +5,7 @@ fix_build_on_x32.diff
 gcc_6.3.diff
 fix_accessibility_crash.diff
 gtkdialogs_wayland.diff
+stop_unloading_plugins.diff
 
 # Debian specific.
 no_dbus_dependency.diff
diff --git a/debian/patches/stop_unloading_plugins.diff b/debian/patches/stop_unloading_plugins.diff
new file mode 100644
index 0000000..707b7df
--- /dev/null
+++ b/debian/patches/stop_unloading_plugins.diff
@@ -0,0 +1,61 @@
+Description: stop unloading plugins in QPluginLoader and QFactoryLoader
+ QPluginLoader hasn't unloaded in its destructor since Qt 5.0, but we
+ missed the equivalent code in QFactoryLoader (which bypasses
+ QPluginLoader). Besides, QPluginLoader::unload() was still doing
+ unloading, which it won't anymore.
+ .
+ Not unloading plugins is Qt's policy, as decided during the 5.0
+ development process and reaffirmed now in 5.6. This is due to static
+ data in plugins leaking out and remaining in use past the unloading of
+ the plugin, causing crashes.
+ .
+ This does not affect QLibrary and QLibrary::unload(). Those are meant
+ for non-Qt loadable modules, so unloading them may be safe.
+Origin: upstream, https://code.qt.io/cgit/qt/qtbase.git/commit/?id=ca4d93d85ee446c5
+Last-Update: 2017-01-11
+
+--- a/src/corelib/plugin/qfactoryloader.cpp
++++ b/src/corelib/plugin/qfactoryloader.cpp
+@@ -187,10 +187,12 @@
+                     ++keyUsageCount;
+                 }
+             }
+-            if (keyUsageCount || keys.isEmpty())
++            if (keyUsageCount || keys.isEmpty()) {
++                library->setLoadHints(QLibrary::PreventUnloadHint); // once loaded, don't unload
+                 d->libraryList += library;
+-            else
++            } else {
+                 library->release();
++            }
+         }
+     }
+ #else
+--- a/src/corelib/plugin/qpluginloader.cpp
++++ b/src/corelib/plugin/qpluginloader.cpp
+@@ -154,6 +154,7 @@
+     : QObject(parent), d(0), did_load(false)
+ {
+     setFileName(fileName);
++    setLoadHints(QLibrary::PreventUnloadHint);
+ }
+ 
+ /*!
+@@ -348,7 +349,7 @@
+ void QPluginLoader::setFileName(const QString &fileName)
+ {
+ #if defined(QT_SHARED)
+-    QLibrary::LoadHints lh;
++    QLibrary::LoadHints lh = QLibrary::PreventUnloadHint;
+     if (d) {
+         lh = d->loadHints();
+         d->release();
+@@ -394,7 +395,7 @@
+     rief Give the load() function some hints on how it should behave.
+ 
+     You can give hints on how the symbols in the plugin are
+-    resolved. By default, none of the hints are set.
++    resolved. By default since Qt 5.7, QLibrary::PreventUnloadHint is set.
+ 
+     See the documentation of QLibrary::loadHints for a complete
+     description of how this property works.

-- 
qtbase packaging



More information about the pkg-kde-commits mailing list