diff options
author | Lisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com> | 2012-11-23 19:08:01 -0300 |
---|---|---|
committer | Lisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com> | 2012-11-23 19:08:01 -0300 |
commit | eb7fa281c46c535ad1f485601b523ced440aeca8 (patch) | |
tree | b8da17e315b41062c330677ed98284ef32a5378d | |
parent | 095ec029cc5350eb5bf62af6315de26072b3364b (diff) | |
download | qt4-x11-eb7fa281c46c535ad1f485601b523ced440aeca8.tar.gz |
Add add_missing_map_noreserve.patch.
Taken from upstream.
-rw-r--r-- | debian/changelog | 3 | ||||
-rw-r--r-- | debian/patches/add_missing_map_noreserve.patch | 33 |
2 files changed, 36 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog index 4202b88..14e04ff 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,6 +8,9 @@ qt4-x11 (4:4.8.2+dfsg-3) UNRELEASED; urgency=medium the correct way of handling this (Closes: #689265). * Add fix_jit_crash_on_x86_64.patch, which avoids 32-bit branch offset overflows. + * 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. -- Debian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org> Fri, 23 Nov 2012 18:01:31 -0300 diff --git a/debian/patches/add_missing_map_noreserve.patch b/debian/patches/add_missing_map_noreserve.patch new file mode 100644 index 0000000..b658b54 --- /dev/null +++ b/debian/patches/add_missing_map_noreserve.patch @@ -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 + |