[SCM] qt5webkit packaging branch, master, updated. debian/5.212.0_alpha2-2-6-g5ca4fc6

Dmitry Shachnev mitya57 at moszumanska.debian.org
Thu Oct 26 21:17:12 UTC 2017


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

The following commit has been merged in the master branch:
commit f1805d88f39a7927f6b42ceaa459e7aff3e919ab
Author: Dmitry Shachnev <mitya57 at gmail.com>
Date:   Fri Oct 27 00:10:33 2017 +0300

    Backport upstream patch to fix WTF::StringImpl::copyChars segfault.
    
    Closes: #876999.
---
 debian/changelog                           |  2 ++
 debian/patches/fix_copyChars_segfault.diff | 43 ++++++++++++++++++++++++++++++
 debian/patches/series                      |  1 +
 3 files changed, 46 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 4fd608a..20f0cc3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,8 @@ qtwebkit-opensource-src (5.212.0~alpha2-3) UNRELEASED; urgency=medium
 
   [ Dmitry Shachnev ]
   * Update symbols files from buildds’ logs.
+  * Backport upstream patch to fix WTF::StringImpl::copyChars segfault
+    (closes: #876999).
 
  -- Debian Qt/KDE Maintainers <debian-qt-kde at lists.debian.org>  Thu, 26 Oct 2017 16:59:00 +0300
 
diff --git a/debian/patches/fix_copyChars_segfault.diff b/debian/patches/fix_copyChars_segfault.diff
new file mode 100644
index 0000000..1c704f3
--- /dev/null
+++ b/debian/patches/fix_copyChars_segfault.diff
@@ -0,0 +1,43 @@
+Description: fix WTF::StringImpl::copyChars segfault when built with GCC 7
+Origin: upstream, https://github.com/annulen/webkit/commit/0caec8a593cd872e
+Last-Update: 2017-10-27
+
+--- a/Source/WTF/wtf/text/StringImpl.h
++++ b/Source/WTF/wtf/text/StringImpl.h
+@@ -619,25 +619,7 @@
+             *destination = *source;
+             return;
+         }
+-
+-        if (numCharacters <= s_copyCharsInlineCutOff) {
+-            unsigned i = 0;
+-#if (CPU(X86) || CPU(X86_64))
+-            const unsigned charsPerInt = sizeof(uint32_t) / sizeof(T);
+-
+-            if (numCharacters > charsPerInt) {
+-                unsigned stopCount = numCharacters & ~(charsPerInt - 1);
+-
+-                const uint32_t* srcCharacters = reinterpret_cast<const uint32_t*>(source);
+-                uint32_t* destCharacters = reinterpret_cast<uint32_t*>(destination);
+-                for (unsigned j = 0; i < stopCount; i += charsPerInt, ++j)
+-                    destCharacters[j] = srcCharacters[j];
+-            }
+-#endif
+-            for (; i < numCharacters; ++i)
+-                destination[i] = source[i];
+-        } else
+-            memcpy(destination, source, numCharacters * sizeof(T));
++        memcpy(destination, source, numCharacters * sizeof(T));
+     }
+ 
+     ALWAYS_INLINE static void copyChars(UChar* destination, const LChar* source, unsigned numCharacters)
+@@ -855,9 +837,6 @@
+         return *tailPointer<StringImpl*>();
+     }
+ 
+-    // This number must be at least 2 to avoid sharing empty, null as well as 1 character strings from SmallStrings.
+-    static const unsigned s_copyCharsInlineCutOff = 20;
+-
+     enum class CaseConvertType { Upper, Lower };
+     template<CaseConvertType type, typename CharacterType> static Ref<StringImpl> convertASCIICase(StringImpl&, const CharacterType*, unsigned);
+ 
diff --git a/debian/patches/series b/debian/patches/series
index 86aaaa8..2f9beef 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
 reduce_exports.diff
 detect_opengl_es2.diff
 atomic_config_test.diff
+fix_copyChars_segfault.diff

-- 
qt5webkit packaging



More information about the pkg-kde-commits mailing list