PKGBUILDs/extra/qt/fix-qtscript-crash.patch
2012-11-05 06:58:08 +00:00

34 lines
1.6 KiB
Diff

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