diff options
Diffstat (limited to 'extra/qt')
-rw-r--r-- | extra/qt/Drop-read-write-perms-for-users.patch | 145 | ||||
-rw-r--r-- | extra/qt/Fix-binary-incompatibility-between-openssl-versions.patch | 80 | ||||
-rw-r--r-- | extra/qt/PKGBUILD | 159 | ||||
-rw-r--r-- | extra/qt/assistant.desktop | 8 | ||||
-rw-r--r-- | extra/qt/declarative-fix-sigbus.patch | 33 | ||||
-rw-r--r-- | extra/qt/designer.desktop | 10 | ||||
-rw-r--r-- | extra/qt/disable-ssl-compression.patch | 68 | ||||
-rw-r--r-- | extra/qt/fix-assistant-crash.patch | 12 | ||||
-rw-r--r-- | extra/qt/fix-crash-in-assistant.patch | 11 | ||||
-rw-r--r-- | extra/qt/fix-qtscript-crash.patch | 34 | ||||
-rw-r--r-- | extra/qt/improve-cups-support.patch | 84 | ||||
-rw-r--r-- | extra/qt/linguist.desktop | 9 | ||||
-rw-r--r-- | extra/qt/qsortfilterproxymodel.patch | 63 | ||||
-rw-r--r-- | extra/qt/qt.install | 12 | ||||
-rw-r--r-- | extra/qt/qtconfig.desktop | 9 | ||||
-rw-r--r-- | extra/qt/undo-fix-jit-crash-on-x86_64.patch | 280 |
16 files changed, 0 insertions, 1017 deletions
diff --git a/extra/qt/Drop-read-write-perms-for-users.patch b/extra/qt/Drop-read-write-perms-for-users.patch deleted file mode 100644 index c3f56e65e..000000000 --- a/extra/qt/Drop-read-write-perms-for-users.patch +++ /dev/null @@ -1,145 +0,0 @@ -From 20b26bdb3dd5e46b01b9a7e1ce8342074df3c89c Mon Sep 17 00:00:00 2001 -From: Thiago Macieira <thiago.macieira@intel.com> -Date: Sat, 22 Dec 2012 08:32:12 -0800 -Subject: [PATCH] Change all shmget calls to user-only memory - -Drop the read and write permissions for group and other users in the -system. - -Change-Id: I8fc753f09126651af3fb82df3049050f0b14e876 -(cherry-picked from Qt 5 commit 856f209fb63ae336bfb389a12d2a75fa886dc1c5) -Reviewed-by: Richard J. Moore <rich@kde.org> ---- - src/corelib/kernel/qsharedmemory_unix.cpp | 6 +++--- - src/corelib/kernel/qsystemsemaphore_unix.cpp | 4 ++-- - src/gui/image/qnativeimage.cpp | 2 +- - src/gui/image/qpixmap_x11.cpp | 2 +- - src/plugins/platforms/xcb/qxcbwindowsurface.cpp | 2 +- - src/plugins/platforms/xlib/qxlibwindowsurface.cpp | 2 +- - .../auto/qtipc/qsharedmemory/tst_qsharedmemory.cpp | 2 +- - tools/qvfb/qvfbshmem.cpp | 4 ++-- - 8 files changed, 12 insertions(+), 12 deletions(-) - -diff --git a/src/corelib/kernel/qsharedmemory_unix.cpp b/src/corelib/kernel/qsharedmemory_unix.cpp -index 20d76e3..4cf3acf 100644 ---- a/src/corelib/kernel/qsharedmemory_unix.cpp -+++ b/src/corelib/kernel/qsharedmemory_unix.cpp -@@ -238,7 +238,7 @@ bool QSharedMemoryPrivate::create(int size) - } - - // create -- if (-1 == shmget(unix_key, size, 0666 | IPC_CREAT | IPC_EXCL)) { -+ if (-1 == shmget(unix_key, size, 0600 | IPC_CREAT | IPC_EXCL)) { - QString function = QLatin1String("QSharedMemory::create"); - switch (errno) { - case EINVAL: -@@ -293,7 +293,7 @@ bool QSharedMemoryPrivate::attach(QSharedMemory::AccessMode mode) - { - #ifndef QT_POSIX_IPC - // grab the shared memory segment id -- int id = shmget(unix_key, 0, (mode == QSharedMemory::ReadOnly ? 0444 : 0660)); -+ int id = shmget(unix_key, 0, (mode == QSharedMemory::ReadOnly ? 0400 : 0600)); - if (-1 == id) { - setErrorString(QLatin1String("QSharedMemory::attach (shmget)")); - return false; -@@ -381,7 +381,7 @@ bool QSharedMemoryPrivate::detach() - size = 0; - - // Get the number of current attachments -- int id = shmget(unix_key, 0, 0444); -+ int id = shmget(unix_key, 0, 0400); - cleanHandle(); - - struct shmid_ds shmid_ds; -diff --git a/src/corelib/kernel/qsystemsemaphore_unix.cpp b/src/corelib/kernel/qsystemsemaphore_unix.cpp -index fad9acc..e77456b 100644 ---- a/src/corelib/kernel/qsystemsemaphore_unix.cpp -+++ b/src/corelib/kernel/qsystemsemaphore_unix.cpp -@@ -153,10 +153,10 @@ key_t QSystemSemaphorePrivate::handle(QSystemSemaphore::AccessMode mode) - } - - // Get semaphore -- semaphore = semget(unix_key, 1, 0666 | IPC_CREAT | IPC_EXCL); -+ semaphore = semget(unix_key, 1, 0600 | IPC_CREAT | IPC_EXCL); - if (-1 == semaphore) { - if (errno == EEXIST) -- semaphore = semget(unix_key, 1, 0666 | IPC_CREAT); -+ semaphore = semget(unix_key, 1, 0600 | IPC_CREAT); - if (-1 == semaphore) { - setErrorString(QLatin1String("QSystemSemaphore::handle")); - cleanHandle(); -diff --git a/src/gui/image/qnativeimage.cpp b/src/gui/image/qnativeimage.cpp -index 9654afe..fef38c5 100644 ---- a/src/gui/image/qnativeimage.cpp -+++ b/src/gui/image/qnativeimage.cpp -@@ -176,7 +176,7 @@ QNativeImage::QNativeImage(int width, int height, QImage::Format format,bool /* - - bool ok; - xshminfo.shmid = shmget(IPC_PRIVATE, xshmimg->bytes_per_line * xshmimg->height, -- IPC_CREAT | 0777); -+ IPC_CREAT | 0700); - ok = xshminfo.shmid != -1; - if (ok) { - xshmimg->data = (char*)shmat(xshminfo.shmid, 0, 0); -diff --git a/src/gui/image/qpixmap_x11.cpp b/src/gui/image/qpixmap_x11.cpp -index 280d8bd..88c9b7b 100644 ---- a/src/gui/image/qpixmap_x11.cpp -+++ b/src/gui/image/qpixmap_x11.cpp -@@ -193,7 +193,7 @@ static bool qt_create_mitshm_buffer(const QPaintDevice* dev, int w, int h) - bool ok; - xshminfo.shmid = shmget(IPC_PRIVATE, - xshmimg->bytes_per_line * xshmimg->height, -- IPC_CREAT | 0777); -+ IPC_CREAT | 0700); - ok = xshminfo.shmid != -1; - if (ok) { - xshmimg->data = (char*)shmat(xshminfo.shmid, 0, 0); -diff --git a/src/plugins/platforms/xcb/qxcbwindowsurface.cpp b/src/plugins/platforms/xcb/qxcbwindowsurface.cpp -index b6a42d8..0d56821 100644 ---- a/src/plugins/platforms/xcb/qxcbwindowsurface.cpp -+++ b/src/plugins/platforms/xcb/qxcbwindowsurface.cpp -@@ -98,7 +98,7 @@ QXcbShmImage::QXcbShmImage(QXcbScreen *screen, const QSize &size, uint depth, QI - 0); - - m_shm_info.shmid = shmget (IPC_PRIVATE, -- m_xcb_image->stride * m_xcb_image->height, IPC_CREAT|0777); -+ m_xcb_image->stride * m_xcb_image->height, IPC_CREAT|0600); - - m_shm_info.shmaddr = m_xcb_image->data = (quint8 *)shmat (m_shm_info.shmid, 0, 0); - m_shm_info.shmseg = xcb_generate_id(xcb_connection()); -diff --git a/src/plugins/platforms/xlib/qxlibwindowsurface.cpp b/src/plugins/platforms/xlib/qxlibwindowsurface.cpp -index bf003eb..46a2f97 100644 ---- a/src/plugins/platforms/xlib/qxlibwindowsurface.cpp -+++ b/src/plugins/platforms/xlib/qxlibwindowsurface.cpp -@@ -99,7 +99,7 @@ void QXlibWindowSurface::resizeShmImage(int width, int height) - - - image_info->shminfo.shmid = shmget (IPC_PRIVATE, -- image->bytes_per_line * image->height, IPC_CREAT|0777); -+ image->bytes_per_line * image->height, IPC_CREAT|0700); - - image_info->shminfo.shmaddr = image->data = (char*)shmat (image_info->shminfo.shmid, 0, 0); - image_info->shminfo.readOnly = False; -diff --git a/tools/qvfb/qvfbshmem.cpp b/tools/qvfb/qvfbshmem.cpp -index 7f9671f..84b6ebe 100644 ---- a/tools/qvfb/qvfbshmem.cpp -+++ b/tools/qvfb/qvfbshmem.cpp -@@ -176,13 +176,13 @@ QShMemViewProtocol::QShMemViewProtocol(int displayid, const QSize &s, - uint data_offset_value = sizeof(QVFbHeader); - - int dataSize = bpl * h + data_offset_value; -- shmId = shmget(key, dataSize, IPC_CREAT | 0666); -+ shmId = shmget(key, dataSize, IPC_CREAT | 0600); - if (shmId != -1) - data = (unsigned char *)shmat(shmId, 0, 0); - else { - struct shmid_ds shm; - shmctl(shmId, IPC_RMID, &shm); -- shmId = shmget(key, dataSize, IPC_CREAT | 0666); -+ shmId = shmget(key, dataSize, IPC_CREAT | 0600); - if (shmId == -1) { - perror("QShMemViewProtocol::QShMemViewProtocol"); - qFatal("Cannot get shared memory 0x%08x", key); --- -1.7.1 - diff --git a/extra/qt/Fix-binary-incompatibility-between-openssl-versions.patch b/extra/qt/Fix-binary-incompatibility-between-openssl-versions.patch deleted file mode 100644 index 5f56edd8d..000000000 --- a/extra/qt/Fix-binary-incompatibility-between-openssl-versions.patch +++ /dev/null @@ -1,80 +0,0 @@ -From 691e78e5061d4cbc0de212d23b06c5dffddf2098 Mon Sep 17 00:00:00 2001 -From: Shane Kearns <dbgshane@gmail.com> -Date: Thu, 6 Dec 2012 17:03:18 +0000 -Subject: [PATCH 54/79] Fix binary incompatibility between openssl versions - -OpenSSL changed the layout of X509_STORE_CTX between 0.9 and 1.0 -So we have to consider this struct as private implementation, and use -the access functions instead. - -This bug would cause certificate verification problems if a different -version of openssl is loaded at runtime to the headers Qt was compiled -against. - -Task-number: QTBUG-28343 -Change-Id: I47fc24336f7d9c80f08f9c8ba6debc51a5591258 -Reviewed-by: Richard J. Moore <rich@kde.org> -(cherry picked from commit eb2688c4c4f257d0a4d978ba4bf57d6347b15252) ---- - src/network/ssl/qsslsocket_openssl.cpp | 2 +- - src/network/ssl/qsslsocket_openssl_symbols.cpp | 8 ++++++++ - src/network/ssl/qsslsocket_openssl_symbols_p.h | 4 ++++ - 3 files changed, 13 insertions(+), 1 deletion(-) - -diff --git a/src/network/ssl/qsslsocket_openssl.cpp b/src/network/ssl/qsslsocket_openssl.cpp -index b7ca290..e912abac 100644 ---- a/src/network/ssl/qsslsocket_openssl.cpp -+++ b/src/network/ssl/qsslsocket_openssl.cpp -@@ -236,7 +236,7 @@ static int q_X509Callback(int ok, X509_STORE_CTX *ctx) - { - if (!ok) { - // Store the error and at which depth the error was detected. -- _q_sslErrorList()->errors << qMakePair<int, int>(ctx->error, ctx->error_depth); -+ _q_sslErrorList()->errors << qMakePair<int, int>(q_X509_STORE_CTX_get_error(ctx), q_X509_STORE_CTX_get_error_depth(ctx)); - } - // Always return OK to allow verification to continue. We're handle the - // errors gracefully after collecting all errors, after verification has -diff --git a/src/network/ssl/qsslsocket_openssl_symbols.cpp b/src/network/ssl/qsslsocket_openssl_symbols.cpp -index 2d6a25b..2e6ccd0 100644 ---- a/src/network/ssl/qsslsocket_openssl_symbols.cpp -+++ b/src/network/ssl/qsslsocket_openssl_symbols.cpp -@@ -267,6 +267,10 @@ DEFINEFUNC2(int, X509_STORE_add_cert, X509_STORE *a, a, X509 *b, b, return 0, re - DEFINEFUNC(void, X509_STORE_CTX_free, X509_STORE_CTX *a, a, return, DUMMYARG) - DEFINEFUNC4(int, X509_STORE_CTX_init, X509_STORE_CTX *a, a, X509_STORE *b, b, X509 *c, c, STACK_OF(X509) *d, d, return -1, return) - DEFINEFUNC2(int, X509_STORE_CTX_set_purpose, X509_STORE_CTX *a, a, int b, b, return -1, return) -+DEFINEFUNC(int, X509_STORE_CTX_get_error, X509_STORE_CTX *a, a, return -1, return) -+DEFINEFUNC(int, X509_STORE_CTX_get_error_depth, X509_STORE_CTX *a, a, return -1, return) -+DEFINEFUNC(X509 *, X509_STORE_CTX_get_current_cert, X509_STORE_CTX *a, a, return 0, return) -+DEFINEFUNC(STACK_OF(X509) *, X509_STORE_CTX_get_chain, X509_STORE_CTX *a, a, return 0, return) - DEFINEFUNC(X509_STORE_CTX *, X509_STORE_CTX_new, DUMMYARG, DUMMYARG, return 0, return) - #ifdef SSLEAY_MACROS - DEFINEFUNC2(int, i2d_DSAPrivateKey, const DSA *a, a, unsigned char **b, b, return -1, return) -@@ -832,6 +836,10 @@ bool q_resolveOpenSslSymbols() - RESOLVEFUNC(X509_STORE_CTX_init) - RESOLVEFUNC(X509_STORE_CTX_new) - RESOLVEFUNC(X509_STORE_CTX_set_purpose) -+ RESOLVEFUNC(X509_STORE_CTX_get_error) -+ RESOLVEFUNC(X509_STORE_CTX_get_error_depth) -+ RESOLVEFUNC(X509_STORE_CTX_get_current_cert) -+ RESOLVEFUNC(X509_STORE_CTX_get_chain) - RESOLVEFUNC(X509_cmp) - #ifndef SSLEAY_MACROS - RESOLVEFUNC(X509_dup) -diff --git a/src/network/ssl/qsslsocket_openssl_symbols_p.h b/src/network/ssl/qsslsocket_openssl_symbols_p.h -index fa9a157..87f3697 100644 ---- a/src/network/ssl/qsslsocket_openssl_symbols_p.h -+++ b/src/network/ssl/qsslsocket_openssl_symbols_p.h -@@ -374,6 +374,10 @@ int q_X509_STORE_CTX_init(X509_STORE_CTX *ctx, X509_STORE *store, - X509 *x509, STACK_OF(X509) *chain); - X509_STORE_CTX *q_X509_STORE_CTX_new(); - int q_X509_STORE_CTX_set_purpose(X509_STORE_CTX *ctx, int purpose); -+int q_X509_STORE_CTX_get_error(X509_STORE_CTX *ctx); -+int q_X509_STORE_CTX_get_error_depth(X509_STORE_CTX *ctx); -+X509 *q_X509_STORE_CTX_get_current_cert(X509_STORE_CTX *ctx); -+STACK_OF(X509) *q_X509_STORE_CTX_get_chain(X509_STORE_CTX *ctx); - - #define q_BIO_get_mem_data(b, pp) (int)q_BIO_ctrl(b,BIO_CTRL_INFO,0,(char *)pp) - #define q_BIO_pending(b) (int)q_BIO_ctrl(b,BIO_CTRL_PENDING,0,NULL) --- -1.8.0.2 - diff --git a/extra/qt/PKGBUILD b/extra/qt/PKGBUILD deleted file mode 100644 index 80c9f2acc..000000000 --- a/extra/qt/PKGBUILD +++ /dev/null @@ -1,159 +0,0 @@ -# $Id: PKGBUILD 177062 2013-02-05 13:17:20Z andrea $ -# Maintainer: Andrea Scarpino <andrea@archlinux.org> -# Contributor: Pierre Schmitz <pierre@archlinux.de> - -pkgbase=qt -pkgname=('qt' 'qt-private-headers') -pkgver=4.8.4 -pkgrel=3 -arch=('i686' 'x86_64' 'mips64el') -url='http://qt-project.org/' -license=('GPL3' 'LGPL') -makedepends=('libtiff' 'libpng' 'libmng' 'sqlite' 'ca-certificates' 'glib2' 'dbus' - 'fontconfig' 'libgl' 'libsm' 'libxrandr' 'libxv' 'libxi' 'alsa-lib' - 'xdg-utils' 'hicolor-icon-theme' 'desktop-file-utils' 'mesa' 'postgresql-libs' - 'mysql' 'unixodbc' 'cups' 'gtk2') -[ "$CARCH" != "mips64el" ] && makedepends+=('libfbclient') -options=('!libtool') -_pkgfqn="${pkgbase}-everywhere-opensource-src-${pkgver}" -source=("http://releases.qt-project.org/qt4/source/${_pkgfqn}.tar.gz" - 'assistant.desktop' 'designer.desktop' 'linguist.desktop' - 'qtconfig.desktop' - 'improve-cups-support.patch' - 'declarative-fix-sigbus.patch' - 'fix-crash-in-assistant.patch' - 'Fix-binary-incompatibility-between-openssl-versions.patch' - 'Drop-read-write-perms-for-users.patch') -md5sums=('89c5ecba180cae74c66260ac732dc5cb' - 'f1837a03fd0ebbd2da58975845f278e3' - '480fea1ed076992b688373c8db274be0' - '5595c24d5bb942c21e3a4d299e6d0bf1' - '824a3b77a25e98567f640e0441ccdebc' - 'c439c7731c25387352d8453ca7574971' - 'aac963d05a9d5733e2bfce9e26607f51' - '57590084078b6379f0501f7728b02ae2' - 'abd18c8a71e08167270b8ec6de61254a' - 'db29b7dd44c56f6026b53b57bbfd9ea3') - -build() { - cd ${_pkgfqn} - - # MIPS N32-specific fix, shouldn't affect correctness on other platforms. - patch -Np1 -i "${srcdir}/declarative-fix-sigbus.patch" - - # (FS#28381) (KDEBUG#180051) - patch -p1 -i "${srcdir}"/improve-cups-support.patch - - # (FS#29469) - patch -p1 -i "${srcdir}"/fix-crash-in-assistant.patch - - # Security fixes - patch -p1 -i "${srcdir}"/Fix-binary-incompatibility-between-openssl-versions.patch - patch -p1 -i "${srcdir}"/Drop-read-write-perms-for-users.patch - - export QT4DIR="${srcdir}"/${_pkgfqn} - export LD_LIBRARY_PATH=${QT4DIR}/lib:${LD_LIBRARY_PATH} - - [ "${CARCH}" = "mips64el" ] && export CXXFLAGS="${CXXFLAGS} -fpermissive" - - sed -i "s|-O2|${CXXFLAGS}|" mkspecs/common/{g++,gcc}-base.conf - sed -i "/^QMAKE_LFLAGS_RPATH/s| -Wl,-rpath,||g" mkspecs/common/gcc-base-unix.conf - sed -i "/^QMAKE_LFLAGS\s/s|+=|+= ${LDFLAGS}|g" mkspecs/common/gcc-base.conf - - [ "$CARCH" != "mips64el" ] && extra="-plugin-sql-ibase" - - ./configure -confirm-license -opensource \ - -prefix /usr \ - -docdir /usr/share/doc/qt \ - -plugindir /usr/lib/qt/plugins \ - -importdir /usr/lib/qt/imports \ - -datadir /usr/share/qt \ - -translationdir /usr/share/qt/translations \ - -sysconfdir /etc/xdg \ - -examplesdir /usr/share/doc/qt/examples \ - -demosdir /usr/share/doc/qt/demos \ - -plugin-sql-{psql,mysql,sqlite,odbc} \ - -system-sqlite \ - -no-phonon \ - -no-phonon-backend \ - -no-webkit \ - -graphicssystem raster \ - -openssl-linked \ - -nomake demos \ - -nomake examples \ - -nomake docs \ - -silent \ - -no-rpath \ - -optimized-qmake \ - -reduce-relocations \ - -dbus-linked \ - -no-openvg \ - $extra - make -j1 # parallel make fails with too long argument list -} - -package_qt() { - pkgdesc='A cross-platform application and UI framework' - depends=('libtiff' 'libpng' 'libmng' 'sqlite' 'ca-certificates' 'glib2' 'dbus' - 'fontconfig' 'libgl' 'libsm' 'libxrandr' 'libxv' 'libxi' 'alsa-lib' - 'xdg-utils' 'hicolor-icon-theme' 'desktop-file-utils') - optdepends=('postgresql-libs: PostgreSQL driver' - 'libmysqlclient: MySQL driver' - 'unixodbc: ODBC driver') - [ "$CARCH" != "mips64el" ] && optdepends+=('libfbclient: Firebird/iBase driver') - optdepends+=('libxinerama: Xinerama support' - 'libxcursor: Xcursor support' - 'libxfixes: Xfixes support' - 'icu: Unicode support') - install='qt.install' - - cd ${_pkgfqn} - make INSTALL_ROOT="${pkgdir}" install - - # install missing icons and desktop files - for icon in tools/linguist/linguist/images/icons/linguist-*-32.png ; do - size=$(echo $(basename ${icon}) | cut -d- -f2) - install -D -m644 ${icon} \ - "${pkgdir}/usr/share/icons/hicolor/${size}x${size}/apps/linguist.png" - done - install -D -m644 src/gui/dialogs/images/qtlogo-64.png \ - "${pkgdir}/usr/share/icons/hicolor/64x64/apps/qtlogo.png" - install -D -m644 tools/assistant/tools/assistant/images/assistant.png \ - "${pkgdir}/usr/share/icons/hicolor/32x32/apps/assistant.png" - install -D -m644 tools/assistant/tools/assistant/images/assistant-128.png \ - "${pkgdir}/usr/share/icons/hicolor/128x128/apps/assistant.png" - install -D -m644 tools/designer/src/designer/images/designer.png \ - "${pkgdir}/usr/share/icons/hicolor/128x128/apps/designer.png" - install -d "${pkgdir}/usr/share/applications" - install -m644 "${srcdir}"/{linguist,designer,assistant,qtconfig}.desktop \ - "${pkgdir}/usr/share/applications/" - - # install license addition - install -D -m644 LGPL_EXCEPTION.txt \ - ${pkgdir}/usr/share/licenses/qt/LGPL_EXCEPTION.txt - - # Fix wrong path in pkgconfig files - find "${pkgdir}/usr/lib/pkgconfig" -type f -name '*.pc' \ - -exec perl -pi -e "s, -L${srcdir}/?\S+,,g" {} \; - - # Fix wrong path in prl files - find "${pkgdir}/usr/lib" -type f -name '*.prl' \ - -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d;s/\(QMAKE_PRL_LIBS =\).*/\1/' {} \; -} - -package_qt-private-headers(){ - pkgdesc="Qt private headers for development" - depends=("qt=${pkgver}") - - install -d "${pkgdir}"/usr/include/{QtCore,QtDeclarative,QtGui,QtScript} - install -d "${pkgdir}"/usr/src/{corelib,declarative,gui,script} - - for i in QtCore QtDeclarative QtGui QtScript; do - cp -r ${_pkgfqn}/include/${i}/private/ \ - "${pkgdir}"/usr/include/${i}/ - done - - for i in corelib declarative gui script; do - cp -r ${_pkgfqn}/src/${i} "${pkgdir}"/usr/src/ - done -} diff --git a/extra/qt/assistant.desktop b/extra/qt/assistant.desktop deleted file mode 100644 index 37ff84b44..000000000 --- a/extra/qt/assistant.desktop +++ /dev/null @@ -1,8 +0,0 @@ -[Desktop Entry] -Name=Qt Assistant -Comment=Shows Qt documentation and examples -Exec=/usr/bin/assistant -Icon=assistant -Terminal=false -Type=Application -Categories=Qt;Development;Documentation; diff --git a/extra/qt/declarative-fix-sigbus.patch b/extra/qt/declarative-fix-sigbus.patch deleted file mode 100644 index 0d446fce5..000000000 --- a/extra/qt/declarative-fix-sigbus.patch +++ /dev/null @@ -1,33 +0,0 @@ ---- qt-everywhere-opensource-src-4.8.0.orig/src/declarative/qml/qdeclarativevmemetaobject.cpp 2012-02-04 21:23:56.573395948 +0100 -+++ qt-everywhere-opensource-src-4.8.0/src/declarative/qml/qdeclarativevmemetaobject.cpp 2012-02-04 23:32:44.900073230 +0100 -@@ -39,6 +39,7 @@ - ** - ****************************************************************************/ - -+#include <cstring> - #include "private/qdeclarativevmemetaobject_p.h" - - #include "qdeclarative.h" -@@ -191,10 +192,12 @@ - - double QDeclarativeVMEVariant::asDouble() - { -+ double result; - if (type != QMetaType::Double) - setValue(double(0)); - -- return *(double *)(dataPtr()); -+ std::memcpy(&result, (double *)(dataPtr()), sizeof(result)); -+ return result; - } - - const QString &QDeclarativeVMEVariant::asQString() -@@ -298,7 +301,7 @@ - cleanup(); - type = QMetaType::Double; - } -- *(double *)(dataPtr()) = v; -+ std::memcpy((double *)(dataPtr()), &v, sizeof(v)); - } - - void QDeclarativeVMEVariant::setValue(const QString &v) diff --git a/extra/qt/designer.desktop b/extra/qt/designer.desktop deleted file mode 100644 index f0b381d02..000000000 --- a/extra/qt/designer.desktop +++ /dev/null @@ -1,10 +0,0 @@ -[Desktop Entry] -Name=Qt Designer -GenericName=Interface Designer -Comment=Design GUIs for Qt applications -Exec=/usr/bin/designer -Icon=designer -MimeType=application/x-designer; -Terminal=false -Type=Application -Categories=Qt;Development; diff --git a/extra/qt/disable-ssl-compression.patch b/extra/qt/disable-ssl-compression.patch deleted file mode 100644 index 443af57f3..000000000 --- a/extra/qt/disable-ssl-compression.patch +++ /dev/null @@ -1,68 +0,0 @@ -From d41dc3e101a694dec98d7bbb582d428d209e5401 Mon Sep 17 00:00:00 2001 -From: Richard Moore <rich@kde.org> -Date: Fri, 14 Sep 2012 00:13:08 +0100 -Subject: [PATCH] Disable SSL compression by default. - -Disable SSL compression by default since this appears to be the a likely -cause of the currently hyped CRIME attack. - -This is a backport of 5ea896fbc63593f424a7dfbb11387599c0025c74 - -Change-Id: I6eeefb23c6b140a9633b28ed85879459c474348a -Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> -Reviewed-by: Peter Hartmann <phartmann@rim.com> ---- - src/network/ssl/qssl.cpp | 5 +++-- - src/network/ssl/qsslconfiguration.cpp | 4 +++- - src/network/ssl/qsslconfiguration_p.h | 4 +++- - 3 files changed, 9 insertions(+), 4 deletions(-) - -diff --git a/src/network/ssl/qssl.cpp b/src/network/ssl/qssl.cpp -index 49e086f..9578178 100644 ---- a/src/network/ssl/qssl.cpp -+++ b/src/network/ssl/qssl.cpp -@@ -148,8 +148,9 @@ QT_BEGIN_NAMESPACE - - By default, SslOptionDisableEmptyFragments is turned on since this causes - problems with a large number of servers. SslOptionDisableLegacyRenegotiation -- is also turned on, since it introduces a security risk. The other options -- are turned off. -+ is also turned on, since it introduces a security risk. -+ SslOptionDisableCompression is turned on to prevent the attack publicised by -+ CRIME. The other options are turned off. - - Note: Availability of above options depends on the version of the SSL - backend in use. -diff --git a/src/network/ssl/qsslconfiguration.cpp b/src/network/ssl/qsslconfiguration.cpp -index 24c7b77..3a05f54 100644 ---- a/src/network/ssl/qsslconfiguration.cpp -+++ b/src/network/ssl/qsslconfiguration.cpp -@@ -201,7 +201,9 @@ bool QSslConfiguration::isNull() const - d->privateKey.isNull() && - d->peerCertificate.isNull() && - d->peerCertificateChain.count() == 0 && -- d->sslOptions == (QSsl::SslOptionDisableEmptyFragments|QSsl::SslOptionDisableLegacyRenegotiation)); -+ d->sslOptions == ( QSsl::SslOptionDisableEmptyFragments -+ |QSsl::SslOptionDisableLegacyRenegotiation -+ |QSsl::SslOptionDisableCompression)); - } - - /*! -diff --git a/src/network/ssl/qsslconfiguration_p.h b/src/network/ssl/qsslconfiguration_p.h -index 74f17cd..c36b651 100644 ---- a/src/network/ssl/qsslconfiguration_p.h -+++ b/src/network/ssl/qsslconfiguration_p.h -@@ -83,7 +83,9 @@ public: - : protocol(QSsl::SecureProtocols), - peerVerifyMode(QSslSocket::AutoVerifyPeer), - peerVerifyDepth(0), -- sslOptions(QSsl::SslOptionDisableEmptyFragments|QSsl::SslOptionDisableLegacyRenegotiation) -+ sslOptions(QSsl::SslOptionDisableEmptyFragments -+ |QSsl::SslOptionDisableLegacyRenegotiation -+ |QSsl::SslOptionDisableCompression) - { } - - QSslCertificate peerCertificate; --- -1.7.10 - diff --git a/extra/qt/fix-assistant-crash.patch b/extra/qt/fix-assistant-crash.patch deleted file mode 100644 index 67bbbc48b..000000000 --- a/extra/qt/fix-assistant-crash.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- qt-everywhere-opensource-src-4.8.2/tools/assistant/tools/assistant/mainwindow.cpp 2012-06-26 17:37:47.334536023 +0000 -+++ qt-everywhere-opensource-src-4.8.2/tools/assistant/tools/assistant/mainwindow.cpp~ 2012-06-26 17:37:08.531487286 +0000 -@@ -944,8 +944,7 @@ - if (helpEngine.usesAppFont()) - font = helpEngine.appFont(); - -- const QWidgetList &widgets = qApp->allWidgets(); -- foreach (QWidget* widget, widgets) -+ foreach (QWidget* widget, QApplication::allWidgets()) - widget->setFont(font); - } - diff --git a/extra/qt/fix-crash-in-assistant.patch b/extra/qt/fix-crash-in-assistant.patch deleted file mode 100644 index 4246e0532..000000000 --- a/extra/qt/fix-crash-in-assistant.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- qt-everywhere-opensource-src-4.8.2/tools/assistant/tools/assistant/mainwindow.cpp 2012-06-26 17:37:47.334536023 +0000 -+++ qt-everywhere-opensource-src-4.8.2/tools/assistant/tools/assistant/mainwindow.cpp~ 2012-06-26 17:37:08.531487286 +0000 -@@ -944,8 +944,7 @@ - if (helpEngine.usesAppFont()) - font = helpEngine.appFont(); - -- const QWidgetList &widgets = qApp->allWidgets(); -- foreach (QWidget* widget, widgets) -+ foreach (QWidget* widget, QApplication::allWidgets()) - widget->setFont(font); - } diff --git a/extra/qt/fix-qtscript-crash.patch b/extra/qt/fix-qtscript-crash.patch deleted file mode 100644 index 97b1cc62d..000000000 --- a/extra/qt/fix-qtscript-crash.patch +++ /dev/null @@ -1,34 +0,0 @@ -From e6b7178bc2e62a37b4737695bced1b46bced9215 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?J=C4=99drzej=20Nowacki?= <jedrzej.nowacki@digia.com> -Date: Mon, 22 Oct 2012 15:17:19 +0200 -Subject: [PATCH] Fix mmap usage. - -Add missing MAP_NORESERVE and fix error checking. - -Special thanks to Olivier JG for debugging the issue. - -Task-number: QTBUG-27322 -Change-Id: Ia9f4aa80415f0127318714912b524131a5b0f18a -Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> ---- - .../JavaScriptCore/jit/ExecutableAllocatorFixedVMPool.cpp | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/jit/ExecutableAllocatorFixedVMPool.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/jit/ExecutableAllocatorFixedVMPool.cpp -index 16d0fb1..e1237e4 100644 ---- a/src/3rdparty/javascriptcore/JavaScriptCore/jit/ExecutableAllocatorFixedVMPool.cpp -+++ b/src/3rdparty/javascriptcore/JavaScriptCore/jit/ExecutableAllocatorFixedVMPool.cpp -@@ -305,8 +305,8 @@ public: - randomLocation += (1 << 24); - randomLocation <<= 21; - #endif -- m_base = mmap(reinterpret_cast<void*>(randomLocation), m_totalHeapSize, INITIAL_PROTECTION_FLAGS, MAP_PRIVATE | MAP_ANON, VM_TAG_FOR_EXECUTABLEALLOCATOR_MEMORY, 0); -- if (!m_base) -+ m_base = mmap(reinterpret_cast<void*>(randomLocation), m_totalHeapSize, INITIAL_PROTECTION_FLAGS, MAP_PRIVATE | MAP_ANON | MAP_NORESERVE, VM_TAG_FOR_EXECUTABLEALLOCATOR_MEMORY, 0); -+ if (m_base == MAP_FAILED) - CRASH(); - - // For simplicity, we keep all memory in m_freeList in a 'released' state. --- -1.8.0 - diff --git a/extra/qt/improve-cups-support.patch b/extra/qt/improve-cups-support.patch deleted file mode 100644 index e0305e11b..000000000 --- a/extra/qt/improve-cups-support.patch +++ /dev/null @@ -1,84 +0,0 @@ -diff -ur qt-everywhere-opensource-src-4.6.2/src/gui/dialogs/qprintdialog_unix.cpp qt-everywhere-opensource-src-4.6.2-cups/src/gui/dialogs/qprintdialog_unix.cpp ---- qt-everywhere-opensource-src-4.6.2/src/gui/dialogs/qprintdialog_unix.cpp 2010-02-11 16:55:22.000000000 +0100 -+++ qt-everywhere-opensource-src-4.6.2-cups/src/gui/dialogs/qprintdialog_unix.cpp 2010-02-28 04:34:16.000000000 +0100 -@@ -569,6 +569,32 @@ - void QPrintDialogPrivate::selectPrinter(QCUPSSupport *cups) - { - options.duplex->setEnabled(cups && cups->ppdOption("Duplex")); -+ -+ if (cups) { -+ const ppd_option_t* duplex = cups->ppdOption("Duplex"); -+ if (duplex) { -+ // copy default ppd duplex to qt dialog -+ if (qstrcmp(duplex->defchoice, "DuplexTumble") == 0) -+ options.duplexShort->setChecked(true); -+ else if (qstrcmp(duplex->defchoice, "DuplexNoTumble") == 0) -+ options.duplexLong->setChecked(true); -+ else -+ options.noDuplex->setChecked(true); -+ } -+ -+ if (cups->currentPPD()) { -+ // set default color -+ if (cups->currentPPD()->color_device) -+ options.color->setChecked(true); -+ else -+ options.grayscale->setChecked(true); -+ } -+ -+ // set collation -+ const ppd_option_t *collate = cups->ppdOption("Collate"); -+ if (collate) -+ options.collate->setChecked(qstrcmp(collate->defchoice, "True")==0); -+ } - } - #endif - -diff -ur qt-everywhere-opensource-src-4.6.2/src/gui/painting/qprinter.cpp qt-everywhere-opensource-src-4.6.2-cups/src/gui/painting/qprinter.cpp ---- qt-everywhere-opensource-src-4.6.2/src/gui/painting/qprinter.cpp 2010-02-11 16:55:22.000000000 +0100 -+++ qt-everywhere-opensource-src-4.6.2-cups/src/gui/painting/qprinter.cpp 2010-02-28 04:55:15.000000000 +0100 -@@ -627,6 +627,44 @@ - && d_ptr->paintEngine->type() != QPaintEngine::MacPrinter) { - setOutputFormat(QPrinter::PdfFormat); - } -+ -+#if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY) -+ // fill in defaults from ppd file -+ QCUPSSupport cups; -+ -+ int printernum = -1; -+ for (int i = 0; i < cups.availablePrintersCount(); i++) { -+ if (printerName().toLocal8Bit() == cups.availablePrinters()[i].name) -+ printernum = i; -+ } -+ if (printernum >= 0) { -+ cups.setCurrentPrinter(printernum); -+ -+ const ppd_option_t* duplex = cups.ppdOption("Duplex"); -+ if (duplex) { -+ // copy default ppd duplex to qt dialog -+ if (qstrcmp(duplex->defchoice, "DuplexTumble") == 0) -+ setDuplex(DuplexShortSide); -+ else if (qstrcmp(duplex->defchoice, "DuplexNoTumble") == 0) -+ setDuplex(DuplexLongSide); -+ else -+ setDuplex(DuplexNone); -+ } -+ -+ if (cups.currentPPD()) { -+ // set default color -+ if (cups.currentPPD()->color_device) -+ setColorMode(Color); -+ else -+ setColorMode(GrayScale); -+ } -+ -+ // set collation -+ const ppd_option_t *collate = cups.ppdOption("Collate"); -+ if (collate) -+ setCollateCopies(qstrcmp(collate->defchoice, "True")==0); -+ } -+#endif - } - - /*! diff --git a/extra/qt/linguist.desktop b/extra/qt/linguist.desktop deleted file mode 100644 index 3b203e0bd..000000000 --- a/extra/qt/linguist.desktop +++ /dev/null @@ -1,9 +0,0 @@ -[Desktop Entry] -Name=Qt Linguist -Comment=Add translations to Qt applications -Exec=/usr/bin/linguist -Icon=linguist -MimeType=text/vnd.trolltech.linguist;application/x-linguist; -Terminal=false -Type=Application -Categories=Qt;Development; diff --git a/extra/qt/qsortfilterproxymodel.patch b/extra/qt/qsortfilterproxymodel.patch deleted file mode 100644 index 33770e47d..000000000 --- a/extra/qt/qsortfilterproxymodel.patch +++ /dev/null @@ -1,63 +0,0 @@ -From 989e6c5ee6f3e38b24632ec5caf49c5b03d17aed Mon Sep 17 00:00:00 2001 -From: Stephen Kelly <stephen.kelly@kdab.com> -Date: Fri, 14 Sep 2012 15:42:34 +0200 -Subject: [PATCH] Fix crash when invalidating a QSortFilterProxyModel - -Backport of d7a15fbfd93fb566c7793596ea50d8786b9eb654 from qtbase. - -Task-number: QTBUG-27122 -Change-Id: I0b1eda292fd9648e6f08629f7a069b66bb8b59e8 -Reviewed-by: Olivier Goffart <ogoffart@woboq.com> ---- - src/gui/itemviews/qsortfilterproxymodel.cpp | 28 +++++++--- - .../tst_qsortfilterproxymodel.cpp | 61 ++++++++++++++++++++++ - 2 files changed, 83 insertions(+), 6 deletions(-) - -diff --git a/src/gui/itemviews/qsortfilterproxymodel.cpp b/src/gui/itemviews/qsortfilterproxymodel.cpp -index d937b63..9fe224e 100644 ---- a/src/gui/itemviews/qsortfilterproxymodel.cpp -+++ b/src/gui/itemviews/qsortfilterproxymodel.cpp -@@ -1036,18 +1036,34 @@ void QSortFilterProxyModelPrivate::filter_changed(const QModelIndex &source_pare - Mapping *m = it.value(); - QSet<int> rows_removed = handle_filter_changed(m->proxy_rows, m->source_rows, source_parent, Qt::Vertical); - QSet<int> columns_removed = handle_filter_changed(m->proxy_columns, m->source_columns, source_parent, Qt::Horizontal); -- QVector<QModelIndex> mappedChildren = m->mapped_children; -- QVector<QModelIndex>::iterator it2 = mappedChildren.end(); -- while (it2 != mappedChildren.begin()) { -- --it2; -- const QModelIndex source_child_index = *it2; -+ -+ // We need to iterate over a copy of m->mapped_children because otherwise it may be changed by other code, invalidating -+ // the iterator it2. -+ // The m->mapped_children vector can be appended to with indexes which are no longer filtered -+ // out (in create_mapping) when this function recurses for child indexes. -+ const QVector<QModelIndex> mappedChildren = m->mapped_children; -+ QVector<int> indexesToRemove; -+ for (int i = 0; i < mappedChildren.size(); ++i) { -+ const QModelIndex source_child_index = mappedChildren.at(i); - if (rows_removed.contains(source_child_index.row()) || columns_removed.contains(source_child_index.column())) { -- it2 = mappedChildren.erase(it2); -+ indexesToRemove.push_back(i); - remove_from_mapping(source_child_index); - } else { - filter_changed(source_child_index); - } - } -+ QVector<int>::const_iterator removeIt = indexesToRemove.constEnd(); -+ const QVector<int>::const_iterator removeBegin = indexesToRemove.constBegin(); -+ -+ // We can't just remove these items from mappedChildren while iterating above and then -+ // do something like m->mapped_children = mappedChildren, because mapped_children might -+ // be appended to in create_mapping, and we would lose those new items. -+ // Because they are always appended in create_mapping, we can still remove them by -+ // position here. -+ while (removeIt != removeBegin) { -+ --removeIt; -+ m->mapped_children.remove(*removeIt); -+ } - } - - /*! --- -1.8.0 - diff --git a/extra/qt/qt.install b/extra/qt/qt.install deleted file mode 100644 index 5495fb1b5..000000000 --- a/extra/qt/qt.install +++ /dev/null @@ -1,12 +0,0 @@ -post_install() { - xdg-icon-resource forceupdate --theme hicolor &> /dev/null - update-desktop-database -q -} - -post_upgrade() { - post_install -} - -post_remove() { - post_install -} diff --git a/extra/qt/qtconfig.desktop b/extra/qt/qtconfig.desktop deleted file mode 100644 index 95770ff6a..000000000 --- a/extra/qt/qtconfig.desktop +++ /dev/null @@ -1,9 +0,0 @@ -[Desktop Entry] -Name=Qt Config -Comment=Configure Qt behavior, styles, fonts -Exec=/usr/bin/qtconfig -Icon=qtlogo -Terminal=false -Type=Application -Categories=Qt;Settings; -NoDisplay=true diff --git a/extra/qt/undo-fix-jit-crash-on-x86_64.patch b/extra/qt/undo-fix-jit-crash-on-x86_64.patch deleted file mode 100644 index ac86a846b..000000000 --- a/extra/qt/undo-fix-jit-crash-on-x86_64.patch +++ /dev/null @@ -1,280 +0,0 @@ -Description: Fix JIT crash on x86-64 (avoid 32-bit branch offset overflow) - . - Cherry-picked from webkit commit - a5b3261a8c4386b4e14ce40a34c7fc933a5f7001 -Origin: commit ada98493bbfbd9af0d0b593017e29d39bcd3495e -Author: Kent Hansen <kent.hansen@nokia.com> -Forwarded: not-needed -Applied-Upstream: yes -Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com> -Reviewed-by: Kent Hansen <kent.hansen@nokia.com> ---- - .../javascriptcore/JavaScriptCore/ChangeLog | 27 +++++++++++++++++ - .../JavaScriptCore/JavaScriptCore.pri | 1 + - .../JavaScriptCore/jit/ExecutableAllocator.cpp | 21 +++++++++++++ - .../jit/ExecutableAllocatorFixedVMPool.cpp | 31 +++++++++++++------- - .../jit/ExecutableAllocatorPosix.cpp | 29 ++---------------- - .../jit/ExecutableAllocatorSymbian.cpp | 2 +- - .../JavaScriptCore/jit/ExecutableAllocatorWin.cpp | 2 +- - .../javascriptcore/JavaScriptCore/wtf/Platform.h | 10 +++++++ - 8 files changed, 84 insertions(+), 39 deletions(-) - -diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/ChangeLog b/src/3rdparty/javascriptcore/JavaScriptCore/ChangeLog -index 9cbf0c1..5ab23e6 100644 ---- a/src/3rdparty/javascriptcore/JavaScriptCore/ChangeLog -+++ b/src/3rdparty/javascriptcore/JavaScriptCore/ChangeLog -@@ -1,3 +1,30 @@ -+2010-07-08 Gavin Barraclough <barraclough@apple.com> -+ -+ Reviewed by Sam Weinig. -+ -+ https://bugs.webkit.org/show_bug.cgi?id=41641 -+ -+ Update compile flags to allow use of ExecutableAllocatorFixedVMPool on platforms -+ other than x86-64 (this may be useful on 32-bit platforms, too). -+ -+ Simplify ifdefs by dividing into thwo broad allocation strategies -+ (ENABLE_EXECUTABLE_ALLOCATOR_FIXED & ENABLE_EXECUTABLE_ALLOCATOR_DEMAND). -+ -+ Rename constant used in the code to have names descriptive of their purpose, -+ rather than their specific value on a given platform. -+ -+ * jit/ExecutableAllocator.cpp: -+ (JSC::ExecutableAllocator::reprotectRegion): -+ (JSC::ExecutableAllocator::cacheFlush): -+ * jit/ExecutableAllocatorFixedVMPool.cpp: -+ (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator): -+ (JSC::FixedVMPoolAllocator::free): -+ (JSC::ExecutablePool::systemAlloc): -+ * jit/ExecutableAllocatorPosix.cpp: -+ * jit/ExecutableAllocatorSymbian.cpp: -+ * jit/ExecutableAllocatorWin.cpp: -+ * wtf/Platform.h: -+ - 2010-08-24 Oliver Hunt <oliver@apple.com> - - Reviewed by Geoff Garen. -diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/JavaScriptCore.pri b/src/3rdparty/javascriptcore/JavaScriptCore/JavaScriptCore.pri -index b061321..847f69c 100644 ---- a/src/3rdparty/javascriptcore/JavaScriptCore/JavaScriptCore.pri -+++ b/src/3rdparty/javascriptcore/JavaScriptCore/JavaScriptCore.pri -@@ -100,6 +100,7 @@ SOURCES += \ - interpreter/CallFrame.cpp \ - interpreter/Interpreter.cpp \ - interpreter/RegisterFile.cpp \ -+ jit/ExecutableAllocatorFixedVMPool.cpp \ - jit/ExecutableAllocatorPosix.cpp \ - jit/ExecutableAllocatorSymbian.cpp \ - jit/ExecutableAllocatorWin.cpp \ -diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/jit/ExecutableAllocator.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/jit/ExecutableAllocator.cpp -index f6b27ec..f0ebbab 100644 ---- a/src/3rdparty/javascriptcore/JavaScriptCore/jit/ExecutableAllocator.cpp -+++ b/src/3rdparty/javascriptcore/JavaScriptCore/jit/ExecutableAllocator.cpp -@@ -33,6 +33,27 @@ namespace JSC { - - size_t ExecutableAllocator::pageSize = 0; - -+#if ENABLE(ASSEMBLER_WX_EXCLUSIVE) -+void ExecutableAllocator::reprotectRegion(void* start, size_t size, ProtectionSeting setting) -+{ -+ if (!pageSize) -+ intializePageSize(); -+ -+ // Calculate the start of the page containing this region, -+ // and account for this extra memory within size. -+ intptr_t startPtr = reinterpret_cast<intptr_t>(start); -+ intptr_t pageStartPtr = startPtr & ~(pageSize - 1); -+ void* pageStart = reinterpret_cast<void*>(pageStartPtr); -+ size += (startPtr - pageStartPtr); -+ -+ // Round size up -+ size += (pageSize - 1); -+ size &= ~(pageSize - 1); -+ -+ mprotect(pageStart, size, (setting == Writable) ? PROTECTION_FLAGS_RW : PROTECTION_FLAGS_RX); -+} -+#endif -+ - } - - #endif // HAVE(ASSEMBLER) -diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/jit/ExecutableAllocatorFixedVMPool.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/jit/ExecutableAllocatorFixedVMPool.cpp -index dd1db4e..16d0fb1 100644 ---- a/src/3rdparty/javascriptcore/JavaScriptCore/jit/ExecutableAllocatorFixedVMPool.cpp -+++ b/src/3rdparty/javascriptcore/JavaScriptCore/jit/ExecutableAllocatorFixedVMPool.cpp -@@ -27,25 +27,33 @@ - - #include "ExecutableAllocator.h" - --#include <errno.h> -+#if ENABLE(EXECUTABLE_ALLOCATOR_FIXED) - --#if ENABLE(ASSEMBLER) && OS(DARWIN) && CPU(X86_64) -+#include <errno.h> - - #include "TCSpinLock.h" --#include <mach/mach_init.h> --#include <mach/vm_map.h> - #include <sys/mman.h> - #include <unistd.h> - #include <wtf/AVLTree.h> - #include <wtf/VMTags.h> - -+#if CPU(X86_64) -+ // These limits suitable on 64-bit platforms (particularly x86-64, where we require all jumps to have a 2Gb max range). -+ #define VM_POOL_SIZE (2u * 1024u * 1024u * 1024u) // 2Gb -+ #define COALESCE_LIMIT (16u * 1024u * 1024u) // 16Mb -+#else -+ // These limits are hopefully sensible on embedded platforms. -+ #define VM_POOL_SIZE (32u * 1024u * 1024u) // 32Mb -+ #define COALESCE_LIMIT (4u * 1024u * 1024u) // 4Mb -+#endif -+ -+// ASLR currently only works on darwin (due to arc4random) & 64-bit (due to address space size). -+#define VM_POOL_ASLR (OS(DARWIN) && CPU(X86_64)) -+ - using namespace WTF; - - namespace JSC { - --#define TWO_GB (2u * 1024u * 1024u * 1024u) --#define SIXTEEN_MB (16u * 1024u * 1024u) -- - // FreeListEntry describes a free chunk of memory, stored in the freeList. - struct FreeListEntry { - FreeListEntry(void* pointer, size_t size) -@@ -291,9 +299,12 @@ public: - // for now instead of 2^26 bits of ASLR lets stick with 25 bits of randomization plus - // 2^24, which should put up somewhere in the middle of usespace (in the address range - // 0x200000000000 .. 0x5fffffffffff). -- intptr_t randomLocation = arc4random() & ((1 << 25) - 1); -+ intptr_t randomLocation = 0; -+#if VM_POOL_ASLR -+ randomLocation = arc4random() & ((1 << 25) - 1); - randomLocation += (1 << 24); - randomLocation <<= 21; -+#endif - m_base = mmap(reinterpret_cast<void*>(randomLocation), m_totalHeapSize, INITIAL_PROTECTION_FLAGS, MAP_PRIVATE | MAP_ANON, VM_TAG_FOR_EXECUTABLEALLOCATOR_MEMORY, 0); - if (!m_base) - CRASH(); -@@ -387,7 +398,7 @@ public: - // 16MB of allocations have been freed, sweep m_freeList - // coalescing any neighboring fragments. - m_countFreedSinceLastCoalesce += size; -- if (m_countFreedSinceLastCoalesce >= SIXTEEN_MB) { -+ if (m_countFreedSinceLastCoalesce >= COALESCE_LIMIT) { - m_countFreedSinceLastCoalesce = 0; - coalesceFreeSpace(); - } -@@ -429,7 +440,7 @@ ExecutablePool::Allocation ExecutablePool::systemAlloc(size_t size) - SpinLockHolder lock_holder(&spinlock); - - if (!allocator) -- allocator = new FixedVMPoolAllocator(JIT_ALLOCATOR_LARGE_ALLOC_SIZE, TWO_GB); -+ allocator = new FixedVMPoolAllocator(JIT_ALLOCATOR_LARGE_ALLOC_SIZE, VM_POOL_SIZE); - ExecutablePool::Allocation alloc = {reinterpret_cast<char*>(allocator->alloc(size)), size}; - return alloc; - } -diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/jit/ExecutableAllocatorPosix.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/jit/ExecutableAllocatorPosix.cpp -index 2eb0c87..b04049c 100644 ---- a/src/3rdparty/javascriptcore/JavaScriptCore/jit/ExecutableAllocatorPosix.cpp -+++ b/src/3rdparty/javascriptcore/JavaScriptCore/jit/ExecutableAllocatorPosix.cpp -@@ -27,7 +27,7 @@ - - #include "ExecutableAllocator.h" - --#if ENABLE(ASSEMBLER) && OS(UNIX) && !OS(SYMBIAN) -+#if ENABLE(EXECUTABLE_ALLOCATOR_DEMAND) && !OS(WINDOWS) && !OS(SYMBIAN) - - #include <sys/mman.h> - #include <unistd.h> -@@ -35,8 +35,6 @@ - - namespace JSC { - --#if !(OS(DARWIN) && !PLATFORM(QT) && CPU(X86_64)) -- - void ExecutableAllocator::intializePageSize() - { - ExecutableAllocator::pageSize = getpagesize(); -@@ -57,29 +55,6 @@ void ExecutablePool::systemRelease(const ExecutablePool::Allocation& alloc) - ASSERT_UNUSED(result, !result); - } - --#endif // !(OS(DARWIN) && !PLATFORM(QT) && CPU(X86_64)) -- --#if ENABLE(ASSEMBLER_WX_EXCLUSIVE) --void ExecutableAllocator::reprotectRegion(void* start, size_t size, ProtectionSeting setting) --{ -- if (!pageSize) -- intializePageSize(); -- -- // Calculate the start of the page containing this region, -- // and account for this extra memory within size. -- intptr_t startPtr = reinterpret_cast<intptr_t>(start); -- intptr_t pageStartPtr = startPtr & ~(pageSize - 1); -- void* pageStart = reinterpret_cast<void*>(pageStartPtr); -- size += (startPtr - pageStartPtr); -- -- // Round size up -- size += (pageSize - 1); -- size &= ~(pageSize - 1); -- -- mprotect(pageStart, size, (setting == Writable) ? PROTECTION_FLAGS_RW : PROTECTION_FLAGS_RX); --} --#endif -- - } - --#endif // HAVE(ASSEMBLER) -+#endif -diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/jit/ExecutableAllocatorSymbian.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/jit/ExecutableAllocatorSymbian.cpp -index e82975c..9028f50 100644 ---- a/src/3rdparty/javascriptcore/JavaScriptCore/jit/ExecutableAllocatorSymbian.cpp -+++ b/src/3rdparty/javascriptcore/JavaScriptCore/jit/ExecutableAllocatorSymbian.cpp -@@ -22,7 +22,7 @@ - - #include "ExecutableAllocator.h" - --#if ENABLE(ASSEMBLER) && OS(SYMBIAN) -+#if ENABLE(EXECUTABLE_ALLOCATOR_DEMAND) && OS(SYMBIAN) - - #include <e32hal.h> - #include <e32std.h> -diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/jit/ExecutableAllocatorWin.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/jit/ExecutableAllocatorWin.cpp -index e38323c..72a1d5f 100644 ---- a/src/3rdparty/javascriptcore/JavaScriptCore/jit/ExecutableAllocatorWin.cpp -+++ b/src/3rdparty/javascriptcore/JavaScriptCore/jit/ExecutableAllocatorWin.cpp -@@ -27,7 +27,7 @@ - - #include "ExecutableAllocator.h" - --#if ENABLE(ASSEMBLER) && OS(WINDOWS) -+#if ENABLE(EXECUTABLE_ALLOCATOR_DEMAND) && OS(WINDOWS) - - #include "windows.h" - -diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h -index 700977e..d930ed7 100644 ---- a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h -+++ b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h -@@ -1016,6 +1016,16 @@ on MinGW. See https://bugs.webkit.org/show_bug.cgi?id=29268 */ - #define ENABLE_ASSEMBLER_WX_EXCLUSIVE 0 - #endif - -+/* Pick which allocator to use; we only need an executable allocator if the assembler is compiled in. -+ On x86-64 we use a single fixed mmap, on other platforms we mmap on demand. */ -+#if ENABLE(ASSEMBLER) -+#if CPU(X86_64) -+#define ENABLE_EXECUTABLE_ALLOCATOR_FIXED 1 -+#else -+#define ENABLE_EXECUTABLE_ALLOCATOR_DEMAND 1 -+#endif -+#endif -+ - #if !defined(ENABLE_PAN_SCROLLING) && OS(WINDOWS) - #define ENABLE_PAN_SCROLLING 1 - #endif --- -1.7.10.4 - |