[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#696325: unblock: qt4-x11/4:4.8.2+dfsg-6



Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock

Please unblock package qt4-x11

This last upload fixes the FTBFS we had on ia64 [0].
I'm including two debdiffs:

- qt4-x11_against_sid.diff represents the changes in the last upload wrt the
previous one.

- qt4-x11_against_wheezy.diff represents all the changes wrt wheezy, including
previously unblocked uploads.

[0] JFTR, it seems to be a bug in gcc with precompiled headers.

The diffstats:

$ diffstat qt4-x11_against_sid.diff
 changelog                      |   11 +++++++++++
 patches/add-winvalid-pch.patch |   16 ----------------
 patches/series                 |    1 -
 rules                          |    4 ++++
 4 files changed, 15 insertions(+), 17 deletions(-)

$ diffstat qt4-x11_against_wheezy.diff
 changelog                                        |   44 +++
 control                                          |    1 
 patches/add_missing_map_noreserve.patch          |   33 ++
 patches/disable-SSL-compression-by-default.patch |   65 +++++
 patches/fix_jit_crash_on_x86_64.patch            |  283 +++++++++++++++++++++++
 patches/series                                   |    3 
 rules                                            |    6 
 7 files changed, 432 insertions(+), 3 deletions(-)

Kinds regards, Lisandro.

unblock qt4-x11/4:4.8.2+dfsg-6

-- System Information:
Debian Release: 7.0
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.2.21+edid (SMP w/2 CPU cores)
Locale: LANG=es_AR.UTF-8, LC_CTYPE=es_AR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
diff -Nru qt4-x11-4.8.2+dfsg/debian/changelog qt4-x11-4.8.2+dfsg/debian/changelog
--- qt4-x11-4.8.2+dfsg/debian/changelog	2012-12-16 15:03:58.000000000 -0300
+++ qt4-x11-4.8.2+dfsg/debian/changelog	2012-12-18 07:21:52.000000000 -0300
@@ -1,3 +1,14 @@
+qt4-x11 (4:4.8.2+dfsg-6) unstable; urgency=low
+
+  [ Debian Qt/KDE Maintainers ]
+  * Hopefully fix ia64 FTBFS:
+    - Remove add-winvalid.patch. Stephan Schreiber has determined the problem
+      with the precompiled headers on ia64. Thanks *a lot* Stephan.
+    - Apply the changes suggested by Stephan to avoid using pre compiled
+      headers just on ia64.
+
+ -- Lisandro Damián Nicanor Pérez Meyer <lisandro@debian.org>  Tue, 18 Dec 2012 07:21:48 -0300
+
 qt4-x11 (4:4.8.2+dfsg-5) unstable; urgency=low
 
   * Add some changes in order to determine the reason of the FTBFS on ia64:
diff -Nru qt4-x11-4.8.2+dfsg/debian/patches/add-winvalid-pch.patch qt4-x11-4.8.2+dfsg/debian/patches/add-winvalid-pch.patch
--- qt4-x11-4.8.2+dfsg/debian/patches/add-winvalid-pch.patch	2012-12-16 14:55:45.000000000 -0300
+++ qt4-x11-4.8.2+dfsg/debian/patches/add-winvalid-pch.patch	1969-12-31 21:00:00.000000000 -0300
@@ -1,16 +0,0 @@
-Description: Add -Winvalid-pch to CFLAGS.
- This will allow a more verbose build, which may help us to determine the reason
- of the FTBFS on ia64.
-Author: Stephan Schreiber <info@fs-driver.org>
-Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=696096
-
---- a/mkspecs/common/g++-base.conf.orig	2012-12-16 14:36:37.347714646 +0100
-+++ b/mkspecs/common/g++-base.conf	2012-12-16 14:37:45.335717820 +0100
-@@ -25,6 +25,6 @@
- QMAKE_PCH_OUTPUT_EXT = .gch
- 
- QMAKE_CFLAGS_PRECOMPILE       = -x c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
--QMAKE_CFLAGS_USE_PRECOMPILE   = -include ${QMAKE_PCH_OUTPUT_BASE}
-+QMAKE_CFLAGS_USE_PRECOMPILE   = -include ${QMAKE_PCH_OUTPUT_BASE} -Winvalid-pch
- QMAKE_CXXFLAGS_PRECOMPILE     = -x c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
- QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
diff -Nru qt4-x11-4.8.2+dfsg/debian/patches/series qt4-x11-4.8.2+dfsg/debian/patches/series
--- qt4-x11-4.8.2+dfsg/debian/patches/series	2012-12-16 14:51:16.000000000 -0300
+++ qt4-x11-4.8.2+dfsg/debian/patches/series	2012-12-17 21:47:01.000000000 -0300
@@ -51,4 +51,3 @@
 no_libicu_message.diff
 QTBUG-25324_assistant_segfault_on_start_with_gcc_4.7.patch
 fix_use_after_free_qlocale_unix.patch
-add-winvalid-pch.patch
diff -Nru qt4-x11-4.8.2+dfsg/debian/rules qt4-x11-4.8.2+dfsg/debian/rules
--- qt4-x11-4.8.2+dfsg/debian/rules	2012-12-16 14:48:43.000000000 -0300
+++ qt4-x11-4.8.2+dfsg/debian/rules	2012-12-18 07:21:08.000000000 -0300
@@ -85,6 +85,10 @@
   endif
 endif
 
+ifeq ($(DEB_HOST_ARCH),ia64)
+	extra_configure_opts += -no-pch
+endif
+
 %:
 	dh $@ --with pkgkde_symbolshelper
 
diff -Nru qt4-x11-4.8.2+dfsg/debian/changelog qt4-x11-4.8.2+dfsg/debian/changelog
--- qt4-x11-4.8.2+dfsg/debian/changelog	2012-08-27 17:54:43.000000000 -0300
+++ qt4-x11-4.8.2+dfsg/debian/changelog	2012-12-18 07:21:52.000000000 -0300
@@ -1,3 +1,47 @@
+qt4-x11 (4:4.8.2+dfsg-6) unstable; urgency=low
+
+  [ Debian Qt/KDE Maintainers ]
+  * Hopefully fix ia64 FTBFS:
+    - Remove add-winvalid.patch. Stephan Schreiber has determined the problem
+      with the precompiled headers on ia64. Thanks *a lot* Stephan.
+    - Apply the changes suggested by Stephan to avoid using pre compiled
+      headers just on ia64.
+
+ -- Lisandro Damián Nicanor Pérez Meyer <lisandro@debian.org>  Tue, 18 Dec 2012 07:21:48 -0300
+
+qt4-x11 (4:4.8.2+dfsg-5) unstable; urgency=low
+
+  * Add some changes in order to determine the reason of the FTBFS on ia64:
+    - Re-allow parallel building on ia64.
+    - Pass -Winvalid-pch to CFLAGS.
+    See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=696096 for more info.
+
+ -- Lisandro Damián Nicanor Pérez Meyer <lisandro@debian.org>  Sun, 16 Dec 2012 15:00:35 -0300
+
+qt4-x11 (4:4.8.2+dfsg-4) unstable; urgency=medium
+
+  * Really apply add_missing_map_noreserve.patch. Thanks Sune for noticing :)
+    (Closes: #685524).
+  * Release to unstable. Keep urgency medium because of the fix for the CRIME
+    attack.
+
+ -- Lisandro Damián Nicanor Pérez Meyer <lisandro@debian.org>  Mon, 26 Nov 2012 14:08:14 -0300
+
+qt4-x11 (4:4.8.2+dfsg-3) unstable; urgency=medium
+
+  * Apply disable-SSL-compression-by-default.patch. Disables SSL compression
+    by default since this appears to be the a likely cause of the currently
+    hyped CRIME attack. Set urgency to medium.
+  * Build-conflict against libqtwebkit-dev. Upstream said that this should be
+    the correct way of handling this (Closes: #689265).
+  * Add fix_jit_crash_on_x86_64.patch, which avoids 32-bit branch offset
+    overflows. Taken from upstream.
+  * Add add_missing_map_noreserve.patch. The previous patch uncovered a bug
+    that happened when memory was reserved in swap. This patch adds a missing
+    MAP_NORESERVE and fixes error checking. Taken from upstream.
+
+ -- Lisandro Damián Nicanor Pérez Meyer <lisandro@debian.org>  Fri, 23 Nov 2012 22:09:58 -0300
+
 qt4-x11 (4:4.8.2+dfsg-2) unstable; urgency=low
 
   * Remove Fix-JIT-crash-on-x86-64-avoid-32-bit-branch-offset-o.patch. It seems
diff -Nru qt4-x11-4.8.2+dfsg/debian/control qt4-x11-4.8.2+dfsg/debian/control
--- qt4-x11-4.8.2+dfsg/debian/control	2012-08-18 16:03:29.000000000 -0300
+++ qt4-x11-4.8.2+dfsg/debian/control	2012-12-16 14:45:20.000000000 -0300
@@ -56,6 +56,7 @@
                rsync,
                unixodbc-dev,
                zlib1g-dev
+Build-Conflicts: libqtwebkit-dev
 Standards-Version: 3.9.3
 Homepage: http://qt-project.org/
 Vcs-Git: git://git.debian.org/pkg-kde/qt/qt4-x11.git
diff -Nru qt4-x11-4.8.2+dfsg/debian/patches/add_missing_map_noreserve.patch qt4-x11-4.8.2+dfsg/debian/patches/add_missing_map_noreserve.patch
--- qt4-x11-4.8.2+dfsg/debian/patches/add_missing_map_noreserve.patch	1969-12-31 21:00:00.000000000 -0300
+++ qt4-x11-4.8.2+dfsg/debian/patches/add_missing_map_noreserve.patch	2012-11-23 18:59:19.000000000 -0300
@@ -0,0 +1,33 @@
+From 24318c77d3fd7441e045c91e1e689391a79b6353 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
+---
+ .../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.7.10.4
+
diff -Nru qt4-x11-4.8.2+dfsg/debian/patches/disable-SSL-compression-by-default.patch qt4-x11-4.8.2+dfsg/debian/patches/disable-SSL-compression-by-default.patch
--- qt4-x11-4.8.2+dfsg/debian/patches/disable-SSL-compression-by-default.patch	1969-12-31 21:00:00.000000000 -0300
+++ qt4-x11-4.8.2+dfsg/debian/patches/disable-SSL-compression-by-default.patch	2012-11-23 18:00:02.000000000 -0300
@@ -0,0 +1,65 @@
+Description:: 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
+From: commit d41dc3e101a694dec98d7bbb582d428d209e5401 Mon Sep 17 00:00:00 2001
+Author: Richard Moore <rich@kde.org>
+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.4
+
diff -Nru qt4-x11-4.8.2+dfsg/debian/patches/fix_jit_crash_on_x86_64.patch qt4-x11-4.8.2+dfsg/debian/patches/fix_jit_crash_on_x86_64.patch
--- qt4-x11-4.8.2+dfsg/debian/patches/fix_jit_crash_on_x86_64.patch	1969-12-31 21:00:00.000000000 -0300
+++ qt4-x11-4.8.2+dfsg/debian/patches/fix_jit_crash_on_x86_64.patch	2012-11-23 18:59:20.000000000 -0300
@@ -0,0 +1,283 @@
+From 353d77098aa7c4cd1e795feeb035799cf70f5c72 Mon Sep 17 00:00:00 2001
+From: Kent Hansen <kent.hansen@nokia.com>
+Date: Thu, 8 Jul 2010 17:26:50 +0000
+Subject: [PATCH] Fix JIT crash on x86-64 (avoid 32-bit branch offset
+ overflow)
+
+Cherry-picked from webkit commit
+a5b3261a8c4386b4e14ce40a34c7fc933a5f7001
+
+Task-number: QTBUG-23871
+Change-Id: Ia028fe072b349e3a7883ae0f6f7298941cc1bc9e
+Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
+(cherry picked from commit 79ebd39d0d4846cb911ae122d2059e5add568d7e in qtscript)
+---
+ .../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
+
diff -Nru qt4-x11-4.8.2+dfsg/debian/patches/series qt4-x11-4.8.2+dfsg/debian/patches/series
--- qt4-x11-4.8.2+dfsg/debian/patches/series	2012-08-21 14:18:28.000000000 -0300
+++ qt4-x11-4.8.2+dfsg/debian/patches/series	2012-12-17 21:47:01.000000000 -0300
@@ -4,6 +4,9 @@
 QTBUG-21900_Buttons_in_Qt_applications_not_clickable_when_run_under_gnome-shell.patch
 QElfParser-fix-type-of-sh_size.patch
 Fix-cursor-truncate-to-include-line-position.patch
+disable-SSL-compression-by-default.patch
+fix_jit_crash_on_x86_64.patch
+add_missing_map_noreserve.patch
 
 # qt-copy patches
 0195-compositing-properties.diff
diff -Nru qt4-x11-4.8.2+dfsg/debian/rules qt4-x11-4.8.2+dfsg/debian/rules
--- qt4-x11-4.8.2+dfsg/debian/rules	2012-08-18 16:35:58.000000000 -0300
+++ qt4-x11-4.8.2+dfsg/debian/rules	2012-12-18 07:21:08.000000000 -0300
@@ -85,12 +85,12 @@
   endif
 endif
 
-ifneq ($(DEB_HOST_ARCH),ia64)
-	extra_dh_opts += --parallel
+ifeq ($(DEB_HOST_ARCH),ia64)
+	extra_configure_opts += -no-pch
 endif
 
 %:
-	dh $@ $(extra_dh_opts) --with pkgkde_symbolshelper
+	dh $@ --with pkgkde_symbolshelper
 
 override_dh_auto_configure:
 	# Test broken hppa kernel with glibc >= 2.5

Reply to: