diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2009-09-09 14:15:49 (GMT) |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2009-09-09 14:16:37 (GMT) |
commit | ee0a43fee20cc398b505eb65218ebed56dfc8f39 (patch) | |
tree | 460beab66cb918595884d3948db842b6f42c0042 /src/3rdparty | |
parent | 33a07e0afd9f98fedd22f4dc2c555cf634ef2b35 (diff) | |
download | Qt-ee0a43fee20cc398b505eb65218ebed56dfc8f39.zip Qt-ee0a43fee20cc398b505eb65218ebed56dfc8f39.tar.gz Qt-ee0a43fee20cc398b505eb65218ebed56dfc8f39.tar.bz2 |
Fix crash of QtScript on Mac OS X
When compiling on 10.4 but running on 10.5 the flags passed to vm_map cause
it to crash.
For now fall back to the use of mmap() as allocator instead.
Reviewed-by: Kent Hansen
Diffstat (limited to 'src/3rdparty')
-rw-r--r-- | src/3rdparty/webkit/JavaScriptCore/runtime/Collector.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/Collector.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/Collector.cpp index 1268d3d..d7fbce8 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/Collector.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/Collector.cpp @@ -233,7 +233,9 @@ void Heap::destroy() template <HeapType heapType> static NEVER_INLINE CollectorBlock* allocateBlock() { -#if PLATFORM(DARWIN) + // Disable the use of vm_map for the Qt build on Darwin, because when compiled on 10.4 + // it crashes on 10.5 +#if PLATFORM(DARWIN) && !PLATFORM(QT) vm_address_t address = 0; // FIXME: tag the region as a JavaScriptCore heap when we get a registered VM tag: <rdar://problem/6054788>. vm_map(current_task(), &address, BLOCK_SIZE, BLOCK_OFFSET_MASK, VM_FLAGS_ANYWHERE | VM_TAG_FOR_COLLECTOR_MEMORY, MEMORY_OBJECT_NULL, 0, FALSE, VM_PROT_DEFAULT, VM_PROT_DEFAULT, VM_INHERIT_DEFAULT); @@ -285,7 +287,9 @@ static NEVER_INLINE CollectorBlock* allocateBlock() static void freeBlock(CollectorBlock* block) { -#if PLATFORM(DARWIN) + // Disable the use of vm_deallocate for the Qt build on Darwin, because when compiled on 10.4 + // it crashes on 10.5 +#if PLATFORM(DARWIN) && !PLATFORM(QT) vm_deallocate(current_task(), reinterpret_cast<vm_address_t>(block), BLOCK_SIZE); #elif PLATFORM(SYMBIAN) userChunk->Free(reinterpret_cast<TAny*>(block)); |