diff options
author | Jędrzej Nowacki <jedrzej.nowacki@digia.com> | 2012-10-22 13:17:19 (GMT) |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-10-31 00:03:22 (GMT) |
commit | e6b7178bc2e62a37b4737695bced1b46bced9215 (patch) | |
tree | 6ee95f10bab06991bab66ce5e438565e49435c2b /src | |
parent | 185ab927308ae88228321532e4070517736eb640 (diff) | |
download | Qt-e6b7178bc2e62a37b4737695bced1b46bced9215.zip Qt-e6b7178bc2e62a37b4737695bced1b46bced9215.tar.gz Qt-e6b7178bc2e62a37b4737695bced1b46bced9215.tar.bz2 |
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>
Diffstat (limited to 'src')
-rw-r--r-- | src/3rdparty/javascriptcore/JavaScriptCore/jit/ExecutableAllocatorFixedVMPool.cpp | 4 |
1 files 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. |