[SCM] Akonadi packaging branch, master, updated. debian/1.13.0-4-3-g08d013a

Dmitry Smirnov onlyjob at moszumanska.debian.org
Thu Jul 16 02:58:34 UTC 2015


Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-req/akonadi.git;a=commitdiff;h=08d013a

The following commit has been merged in the master branch:
commit 08d013a4561c81af4567b498029d2c6103aff155
Author: Dmitry Smirnov <onlyjob at member.fsf.org>
Date:   Thu Jul 16 12:56:57 2015 +1000

    new upstream patch: "upstream-use-QAtomicInt.patch"
---
 debian/patches/series                        |  1 +
 debian/patches/upstream-use-QAtomicInt.patch | 37 ++++++++++++++++++++++++++++
 2 files changed, 38 insertions(+)

diff --git a/debian/patches/series b/debian/patches/series
index c41b8f6..7305176 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,5 +3,6 @@ postgresql9.4.patch
 upstream-fix_typo_in_if_condition.patch
 upstream-fix_buffer_overflow_in_AKTEST_FAKESERVER_MAIN.patch
 upstream-do_not_crash_when_setmntent_returns_NULL.patch
+upstream-use-QAtomicInt.patch
 upstream_dont_call_insert_from_Q_ASSERT.patch
 upstream_dont_leak_old_external_payload_files.patch
diff --git a/debian/patches/upstream-use-QAtomicInt.patch b/debian/patches/upstream-use-QAtomicInt.patch
new file mode 100644
index 0000000..c54930d
--- /dev/null
+++ b/debian/patches/upstream-use-QAtomicInt.patch
@@ -0,0 +1,37 @@
+From 8a113985cda1693c8158916065bd54e57d028cda Mon Sep 17 00:00:00 2001
+From: Milian Wolff <mail at milianw.de>
+Date: Mon, 1 Dec 2014 11:39:33 +0100
+Subject: [PATCH] Use an QAtomicInt instead of a plain bool for
+ Entity::cacheEnabled.
+
+A plain bool is not thread safe and leads to undefined behavior.
+So better be safe than sorry and use a thread safe QAtomicInt.
+---
+ server/src/storage/entities-source.xsl | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/server/src/storage/entities-source.xsl b/server/src/storage/entities-source.xsl
+index 05a8cb1..e398da5 100644
+--- a/server/src/storage/entities-source.xsl
++++ b/server/src/storage/entities-source.xsl
+@@ -99,7 +99,7 @@ class <xsl:value-of select="$className"/>::Private : public QSharedData
+     static void addToCache( const <xsl:value-of select="$className"/> & entry );
+ 
+     // cache
+-    static bool cacheEnabled;
++    static QAtomicInt cacheEnabled;
+     static QMutex cacheMutex;
+     <xsl:if test="column[@name = 'id']">
+     static QHash<qint64, <xsl:value-of select="$className"/> > idCache;
+@@ -111,7 +111,7 @@ class <xsl:value-of select="$className"/>::Private : public QSharedData
+ 
+ 
+ // static members
+-bool <xsl:value-of select="$className"/>::Private::cacheEnabled = false;
++QAtomicInt <xsl:value-of select="$className"/>::Private::cacheEnabled(0);
+ QMutex <xsl:value-of select="$className"/>::Private::cacheMutex;
+ <xsl:if test="column[@name = 'id']">
+ QHash<qint64, <xsl:value-of select="$className"/> > <xsl:value-of select="$className"/>::Private::idCache;
+-- 
+2.1.4
+

-- 
Akonadi packaging



More information about the pkg-kde-commits mailing list