[arch-commits] Commit in kwindowsystem/trunk (PKGBUILD kdebug-337626.patch)

Andrea Scarpino andrea at archlinux.org
Thu Jan 29 10:36:10 UTC 2015


    Date: Thursday, January 29, 2015 @ 11:36:10
  Author: andrea
Revision: 230245

upgpkg: kwindowsystem 5.6.0-3

Fix Kobi crash (FS#43621) (KDEBUG#337626)

Added:
  kwindowsystem/trunk/kdebug-337626.patch
Modified:
  kwindowsystem/trunk/PKGBUILD

---------------------+
 PKGBUILD            |    8 +++++---
 kdebug-337626.patch |   49 +++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 54 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2015-01-29 10:12:22 UTC (rev 230244)
+++ PKGBUILD	2015-01-29 10:36:10 UTC (rev 230245)
@@ -3,7 +3,7 @@
 
 pkgname=kwindowsystem
 pkgver=5.6.0
-pkgrel=2
+pkgrel=3
 pkgdesc='Access to the windowing system'
 arch=('i686' 'x86_64')
 url='https://projects.kde.org/projects/frameworks/kwindowsystem'
@@ -12,9 +12,10 @@
 makedepends=('extra-cmake-modules' 'qt5-tools')
 groups=('kf5')
 source=("http://download.kde.org/stable/frameworks/${pkgver%.*}/${pkgname}-${pkgver}.tar.xz"
-        'kdebug-340348.patch')
+        'kdebug-340348.patch' 'kdebug-337626.patch')
 md5sums=('bcfa5cd27b2735ffb26379b24b437190'
-         '464d5aefb97a2bcb3395d2a6239f670a')
+         '464d5aefb97a2bcb3395d2a6239f670a'
+         'e8c9ffc08782f99cdb88a706c4496f29')
 
 prepare() {
   mkdir build
@@ -21,6 +22,7 @@
 
   cd ${pkgname}-${pkgver}
   patch -p1 -i "${srcdir}"/kdebug-340348.patch
+  patch -p1 -i "${srcdir}"/kdebug-337626.patch
 }
 
 build() {

Added: kdebug-337626.patch
===================================================================
--- kdebug-337626.patch	                        (rev 0)
+++ kdebug-337626.patch	2015-01-29 10:36:10 UTC (rev 230245)
@@ -0,0 +1,49 @@
+commit 9dbb47b07d4b4ec1e3e46098f955d36a318794bb
+Author: Thomas Lübking <thomas.luebking at gmail.com>
+Date:   Mon Nov 17 20:06:20 2014 +0100
+
+    ensure to keep image data alive w/ the image
+    
+    raster QPixmaps re-use the image data (implicitly shared)
+    deleting them w/ scope will thus cause invalidated
+    memory in the returned pixmap
+    
+    BUG: 337626
+    REVIEW: 121158
+
+diff --git a/src/kxutils.cpp b/src/kxutils.cpp
+index 44885e0..c75c08e 100644
+--- a/src/kxutils.cpp
++++ b/src/kxutils.cpp
+@@ -107,19 +107,14 @@ template <typename T> T fromNative(xcb_pixmap_t pixmap)
+     case 30: {
+         // Qt doesn't have a matching image format. We need to convert manually
+         uint32_t *pixels = reinterpret_cast<uint32_t *>(xcb_get_image_data(xImage.data()));
+-        for (int i = 0; i < xImage.data()->length; ++i) {
++        for (uint i = 0; i < xImage.data()->length; ++i) {
+             int r = (pixels[i] >> 22) & 0xff;
+             int g = (pixels[i] >> 12) & 0xff;
+             int b = (pixels[i] >>  2) & 0xff;
+ 
+             pixels[i] = qRgba(r, g, b, 0xff);
+         }
+-        QImage image(reinterpret_cast<uchar *>(pixels), geo->width, geo->height,
+-                     xcb_get_image_data_length(xImage.data()) / geo->height, QImage::Format_ARGB32_Premultiplied);
+-        if (image.isNull()) {
+-            return T();
+-        }
+-        return T::fromImage(image);
++        // fall through, Qt format is still Format_ARGB32_Premultiplied
+     }
+     case 32:
+         format = QImage::Format_ARGB32_Premultiplied;
+@@ -136,7 +131,8 @@ template <typename T> T fromNative(xcb_pixmap_t pixmap)
+         }
+     }
+     QImage image(xcb_get_image_data(xImage.data()), geo->width, geo->height,
+-                 xcb_get_image_data_length(xImage.data()) / geo->height, format);
++                 xcb_get_image_data_length(xImage.data()) / geo->height, format, free, xImage.data());
++    xImage.take();
+     if (image.isNull()) {
+         return T();
+     }



More information about the arch-commits mailing list