diff --git a/qtwebkit-webkit101337.patch b/qtwebkit-webkit101337.patch new file mode 100644 index 0000000..4490c78 --- /dev/null +++ b/qtwebkit-webkit101337.patch @@ -0,0 +1,47 @@ +diff --git a/Source/WebCore/platform/text/qt/TextBreakIteratorQt.cpp b/Source/WebCore/platform/text/qt/TextBreakIteratorQt.cpp +index 0d9d48d..0917b03 100644 +--- a/Source/WebCore/platform/text/qt/TextBreakIteratorQt.cpp ++++ b/Source/WebCore/platform/text/qt/TextBreakIteratorQt.cpp +@@ -25,6 +25,7 @@ + #include + #include + #include ++#include + + // #define DEBUG_TEXT_ITERATORS + #ifdef DEBUG_TEXT_ITERATORS +@@ -70,10 +71,24 @@ namespace WebCore { + + static TextBreakIterator* nonSharedCharacterBreakIterator; + ++ static inline bool compareAndSwapNonSharedCharacterBreakIterator(TextBreakIterator* expected, TextBreakIterator* newValue) ++ { ++#if ENABLE(COMPARE_AND_SWAP) ++ return weakCompareAndSwap(reinterpret_cast(&nonSharedCharacterBreakIterator), expected, newValue); ++#else ++ DEFINE_STATIC_LOCAL(QMutex, nonSharedCharacterBreakIteratorMutex, ()); ++ QMutexLocker locker(&nonSharedCharacterBreakIteratorMutex); ++ if (nonSharedCharacterBreakIterator != expected) ++ return false; ++ nonSharedCharacterBreakIterator = newValue; ++ return true; ++#endif ++ } ++ + NonSharedCharacterBreakIterator::NonSharedCharacterBreakIterator(const UChar* buffer, int length) + { + m_iterator = nonSharedCharacterBreakIterator; +- bool createdIterator = m_iterator && weakCompareAndSwap(reinterpret_cast(&nonSharedCharacterBreakIterator), m_iterator, 0); ++ bool createdIterator = m_iterator && compareAndSwapNonSharedCharacterBreakIterator(m_iterator, 0); + if (!createdIterator) + m_iterator = new TextBreakIterator(); + if (!setUpIterator(*m_iterator, QTextBoundaryFinder::Grapheme, buffer, length)) { +@@ -84,7 +99,7 @@ namespace WebCore { + + NonSharedCharacterBreakIterator::~NonSharedCharacterBreakIterator() + { +- if (!weakCompareAndSwap(reinterpret_cast(&nonSharedCharacterBreakIterator), 0, m_iterator)) ++ if (!compareAndSwapNonSharedCharacterBreakIterator(0, m_iterator)) + delete m_iterator; + } + diff --git a/qtwebkit.spec b/qtwebkit.spec index 74e6405..7791bf3 100644 --- a/qtwebkit.spec +++ b/qtwebkit.spec @@ -3,7 +3,7 @@ Name: qtwebkit Summary: Qt WebKit bindings Version: 2.3.2 -Release: 2%{?dist} +Release: 3%{?dist} License: LGPLv2 with exceptions or GPLv3 with exceptions URL: http://trac.webkit.org/wiki/QtWebKit @@ -43,6 +43,10 @@ Patch10: qtwebkit-ppc.patch Patch11: qtwebkit-23-LLInt-C-Loop-backend-ppc.patch ## upstream patches +# NonSharedCharacterBreakIterator leads to CRASH() in configurations that do not have COMPARE_AND_SWAP enabled +# http://bugs.webkit.org/show_bug.cgi?id=101337 +# https://bugzilla.redhat.com/show_bug.cgi?id=1006539 +Patch100: qtwebkit-webkit101337.patch BuildRequires: bison BuildRequires: chrpath @@ -101,6 +105,7 @@ Provides: qt4-webkit-devel%{?_isa} = 2:%{version}-%{release} %patch10 -p1 -b .system-malloc %patch11 -p1 -b .Double2Ints %endif +%patch100 -p1 -b .webkit101337 %build @@ -154,6 +159,9 @@ popd %changelog +* Thu Sep 12 2013 Rex Dieter 2.3.2-3 +- SIGSEGV - ~NonSharedCharacterBreakIterator (#1006539, webkit#101337) + * Sun Aug 04 2013 Fedora Release Engineering - 2.3.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild