- revert -no-javascript-jit change, false-alarm (#604003)

- QtWebKit does not search correct plugin path(s) (#568860)
- QtWebKit browsers crash with flash-plugin (rh#605677,webkit#40567)
- drop qt-x11-opensource-src-4.5.0-gcc_hack.patch
This commit is contained in:
Rex Dieter 2010-06-18 15:14:08 +00:00
parent c7126434f0
commit c1430cbcf4
4 changed files with 79 additions and 22 deletions

View File

@ -0,0 +1,47 @@
diff -up qt-everywhere-opensource-src-4.7.0-beta1/src/3rdparty/webkit/WebCore/plugins/qt/PluginPackageQt.cpp.gtk_init qt-everywhere-opensource-src-4.7.0-beta1/src/3rdparty/webkit/WebCore/plugins/qt/PluginPackageQt.cpp
--- qt-everywhere-opensource-src-4.7.0-beta1/src/3rdparty/webkit/WebCore/plugins/qt/PluginPackageQt.cpp.gtk_init 2010-05-03 19:43:20.000000000 -0500
+++ qt-everywhere-opensource-src-4.7.0-beta1/src/3rdparty/webkit/WebCore/plugins/qt/PluginPackageQt.cpp 2010-06-18 10:11:20.738800727 -0500
@@ -35,6 +35,8 @@
namespace WebCore {
+typedef void gtkInitFunc(int *argc, char ***argv);
+
bool PluginPackage::fetchInfo()
{
if (!load())
@@ -110,6 +112,8 @@ bool PluginPackage::load()
NP_InitializeFuncPtr NP_Initialize;
NPError npErr;
+ gtkInitFunc* gtkInit;
+
NP_Initialize = (NP_InitializeFuncPtr)m_module->resolve("NP_Initialize");
m_NPP_Shutdown = (NPP_ShutdownProcPtr)m_module->resolve("NP_Shutdown");
@@ -127,6 +131,25 @@ bool PluginPackage::load()
m_browserFuncs.getvalue = staticPluginQuirkRequiresGtkToolKit_NPN_GetValue;
}
+ // WORKAROUND: Prevent gtk based plugin crashes such as BR# 40567 by
+ // explicitly forcing the initializing of Gtk, i.e. calling gtk_init,
+ // whenver the symbol is present in the plugin library loaded above.
+ // Note that this workaround is based on code from the NSPluginClass ctor
+ // in KDE's kdebase/apps/nsplugins/viewer/nsplugin.cpp file.
+ gtkInit = (gtkInitFunc*)m_module->resolve("gtk_init");
+ if (gtkInit) {
+ // Prevent gtk_init() from replacing the X error handlers, since the Gtk
+ // handlers abort when they receive an X error, thus killing the viewer.
+#ifdef Q_WS_X11
+ int (*old_error_handler)(Display*, XErrorEvent*) = XSetErrorHandler(0);
+ int (*old_io_error_handler)(Display*) = XSetIOErrorHandler(0);
+#endif
+ gtkInit(0, 0);
+#ifdef Q_WS_X11
+ XSetErrorHandler(old_error_handler);
+ XSetIOErrorHandler(old_io_error_handler);
+#endif
+ }
#if defined(XP_UNIX)
npErr = NP_Initialize(&m_browserFuncs, &m_pluginFuncs);
#else

View File

@ -0,0 +1,19 @@
diff -up qt-everywhere-opensource-src-4.7.0-beta1/src/3rdparty/webkit/WebCore/plugins/PluginDatabase.cpp.pluginpath qt-everywhere-opensource-src-4.7.0-beta1/src/3rdparty/webkit/WebCore/plugins/PluginDatabase.cpp
--- qt-everywhere-opensource-src-4.7.0-beta1/src/3rdparty/webkit/WebCore/plugins/PluginDatabase.cpp.pluginpath 2010-05-03 19:43:20.000000000 -0500
+++ qt-everywhere-opensource-src-4.7.0-beta1/src/3rdparty/webkit/WebCore/plugins/PluginDatabase.cpp 2010-06-18 10:02:37.004788646 -0500
@@ -345,6 +345,7 @@ Vector<String> PluginDatabase::defaultPl
paths.append("/usr/lib/firefox/plugins");
paths.append("/usr/lib64/browser-plugins");
paths.append("/usr/lib/browser-plugins");
+ paths.append("/usr/lib/mozilla/plugins-wrapped");
paths.append("/usr/lib/mozilla/plugins");
paths.append("/usr/local/netscape/plugins");
paths.append("/opt/mozilla/plugins");
@@ -355,6 +356,7 @@ Vector<String> PluginDatabase::defaultPl
paths.append("/usr/lib/netscape/plugins-libc5");
paths.append("/usr/lib/netscape/plugins-libc6");
paths.append("/usr/lib64/netscape/plugins");
+ paths.append("/usr/lib64/mozilla/plugins-wrapped");
paths.append("/usr/lib64/mozilla/plugins");
paths.append("/usr/lib/nsbrowser/plugins");
paths.append("/usr/lib64/nsbrowser/plugins");

View File

@ -1,14 +0,0 @@
diff -up qt-x11-opensource-src-4.5.0/src/corelib/tools/qstring.cpp.gcc_hack qt-x11-opensource-src-4.5.0/src/corelib/tools/qstring.cpp
--- qt-x11-opensource-src-4.5.0/src/corelib/tools/qstring.cpp.gcc_hack 2009-02-25 15:09:22.000000000 -0600
+++ qt-x11-opensource-src-4.5.0/src/corelib/tools/qstring.cpp 2009-03-27 11:56:51.000000000 -0500
@@ -102,8 +102,8 @@ static QHash<void *, QByteArray> *asciiC
// internal
int qFindString(const QChar *haystack, int haystackLen, int from,
const QChar *needle, int needleLen, Qt::CaseSensitivity cs);
-int qFindStringBoyerMoore(const QChar *haystack, int haystackLen, int from,
- const QChar *needle, int needleLen, Qt::CaseSensitivity cs);
+//int qFindStringBoyerMoore(const QChar *haystack, int haystackLen, int from,
+// const QChar *needle, int needleLen, Qt::CaseSensitivity cs);
// Unicode case-insensitive comparison

21
qt.spec
View File

@ -6,10 +6,7 @@
## disable javascript JIT compiler (selinux crasher)
## WAS https://bugs.webkit.org/show_bug.cgi?id=35154
## i686 blacklist: https://bugzilla.redhat.com/show_bug.cgi?id=604003
%ifarch %{ix86}
%define no_javascript_jit -no-javascript-jit
%endif
#define no_javascript_jit -no-javascript-jit
%define _default_patch_fuzz 3
@ -22,7 +19,7 @@ Summary: Qt toolkit
Name: qt
Epoch: 1
Version: 4.7.0
Release: 0.18.%{pre}%{?dist}
Release: 0.19.%{pre}%{?dist}
# See LGPL_EXCEPTIONS.txt, LICENSE.GPL3, respectively, for exception details
License: LGPLv2 with exceptions or GPLv3 with exceptions
@ -44,8 +41,6 @@ Source5: qconfig-multilib.h
Patch2: qt-x11-opensource-src-4.2.2-multilib-optflags.patch
Patch3: qt-x11-opensource-src-4.2.2-multilib-QMAKEPATH.patch
Patch5: qt-all-opensource-src-4.4.0-rc1-as_IN-437440.patch
# hack around gcc/ppc crasher, http://bugzilla.redhat.com/492185
Patch13: qt-x11-opensource-src-4.5.0-gcc_hack.patch
Patch15: qt-x11-opensource-src-4.5.1-enable_ft_lcdfilter.patch
# include kde4 plugin path, http://bugzilla.redhat.com/498809
Patch16: qt-x11-opensource-src-4.5.1-kde4_plugins.patch
@ -64,10 +59,14 @@ Patch54: qt-x11-opensource-src-4.5.1-mysql_config.patch
Patch55: qt-everywhere-opensource-src-4.6.2-cups.patch
# Add s390x as 64bit and s390 as 31bit bigendian platform
Patch56: qt-everywhere-opensource-src-4.7.0-beta1-s390x.patch
# qtwebkit to search nspluginwrapper paths too
Patch57: qt-everywhere-opensource-src-4.7.0-beta1-qtwebkit_pluginpath.patch
# security patches
# upstream patches
# https://bugs.webkit.org/show_bug.cgi?id=40567
Patch100: qt-everywhere-opensource-src-4.7.0-beta1-qtwebkit_gtk_init.patch
# kde-qt git patches
Patch201: 0001-This-patch-uses-object-name-as-a-fallback-for-window.patch
@ -414,7 +413,6 @@ Qt libraries used for drawing widgets and OpenGL items.
%setup -q -n qt-everywhere-opensource-src-%{version}%{?pre:-%{pre}}
%patch5 -p1 -b .bz#437440-as_IN-437440
%patch13 -p1 -b .gcc_hack
%patch15 -p1 -b .enable_ft_lcdfilter
%patch16 -p1 -b .kde4_plugins
%patch19 -p1 -b .servicesfile
@ -425,6 +423,7 @@ Qt libraries used for drawing widgets and OpenGL items.
%patch54 -p1 -b .mysql_config
%patch55 -p1 -b .cups-1
%patch56 -p1 -b .s390x
%patch57 -p1 -b .qtwebkit_pluginpath
# security fixes
@ -1082,6 +1081,12 @@ fi
%changelog
* Fri Jun 18 2010 Rex Dieter <rdieter@fedoraproject.org> 4.7.0-0.19.beta1
- revert -no-javascript-jit change, false-alarm (#604003)
- QtWebKit does not search correct plugin path(s) (#568860)
- QtWebKit browsers crash with flash-plugin (rh#605677,webkit#40567)
- drop qt-x11-opensource-src-4.5.0-gcc_hack.patch
* Wed Jun 16 2010 Rex Dieter <rdieter@fedoraproject.org> 4.7.0-0.18.beta1
- -no-javascript-jit on i686 (#604003)