Diff
Modified: tags/Safari-534.49.1/Source/_javascript_Core/ChangeLog (92401 => 92402)
--- tags/Safari-534.49.1/Source/_javascript_Core/ChangeLog 2011-08-04 19:35:35 UTC (rev 92401)
+++ tags/Safari-534.49.1/Source/_javascript_Core/ChangeLog 2011-08-04 19:42:31 UTC (rev 92402)
@@ -1,3 +1,20 @@
+2011-08-04 Lucas Forschler <[email protected]>
+
+ Merged 92231.
+
+ 2011-08-01 Michael Saboff <[email protected]>
+
+ Virtual copying of FastMalloc allocated memory causes madvise MADV_FREE_REUSABLE errors
+ https://bugs.webkit.org/show_bug.cgi?id=65502
+
+ Reviewed by Anders Carlsson.
+
+ With the fix of the issues causing madvise MADV_FREE_REUSABLE to fail,
+ added an assert to the return code of madvise to catch any regressions.
+
+ * wtf/TCSystemAlloc.cpp:
+ (TCMalloc_SystemRelease):
+
2011-06-20 Lucas Forschler <[email protected]>
Merged 89281.
Modified: tags/Safari-534.49.1/Source/_javascript_Core/wtf/TCSystemAlloc.cpp (92401 => 92402)
--- tags/Safari-534.49.1/Source/_javascript_Core/wtf/TCSystemAlloc.cpp 2011-08-04 19:35:35 UTC (rev 92401)
+++ tags/Safari-534.49.1/Source/_javascript_Core/wtf/TCSystemAlloc.cpp 2011-08-04 19:42:31 UTC (rev 92402)
@@ -392,7 +392,12 @@
void TCMalloc_SystemRelease(void* start, size_t length)
{
- while (madvise(start, length, MADV_FREE_REUSABLE) == -1 && errno == EAGAIN) { }
+ int madviseResult;
+
+ while ((madviseResult = madvise(start, length, MADV_FREE_REUSABLE)) == -1 && errno == EAGAIN) { }
+
+ // Although really advisory, if madvise fail, we want to know about it.
+ ASSERT_UNUSED(madviseResult, madviseResult != -1);
}
#elif HAVE(MADV_FREE) || HAVE(MADV_DONTNEED)
Modified: tags/Safari-534.49.1/Source/WebCore/ChangeLog (92401 => 92402)
--- tags/Safari-534.49.1/Source/WebCore/ChangeLog 2011-08-04 19:35:35 UTC (rev 92401)
+++ tags/Safari-534.49.1/Source/WebCore/ChangeLog 2011-08-04 19:42:31 UTC (rev 92402)
@@ -1,3 +1,24 @@
+2011-08-04 Lucas Forschler <[email protected]>
+
+ Merged 92231.
+
+ 2011-08-01 Michael Saboff <[email protected]>
+
+ Virtual copying of FastMalloc allocated memory causes madvise MADV_FREE_REUSABLE errors
+ https://bugs.webkit.org/show_bug.cgi?id=65502
+
+ Reviewed by Anders Carlsson.
+
+ Change the vm_copy in PurgeableBuffer::create to be a memcpy. The
+ vm_copy causes the process to have additional references to the same
+ memory region. These additional reference caused madvise(MADV_FREE_REUSABLE)
+ to fail when it encountered such pages.
+
+ No tests added this is a resource defect and not a functional issue.
+
+ * platform/mac/PurgeableBufferMac.cpp:
+ (WebCore::PurgeableBuffer::create):
+
2011-06-14 Lucas Forschler <[email protected]>
Rolled out 89080.
Modified: tags/Safari-534.49.1/Source/WebCore/platform/mac/PurgeableBufferMac.cpp (92401 => 92402)
--- tags/Safari-534.49.1/Source/WebCore/platform/mac/PurgeableBufferMac.cpp 2011-08-04 19:35:35 UTC (rev 92401)
+++ tags/Safari-534.49.1/Source/WebCore/platform/mac/PurgeableBufferMac.cpp 2011-08-04 19:42:31 UTC (rev 92402)
@@ -64,14 +64,8 @@
if (ret != KERN_SUCCESS)
return nullptr;
- ret = vm_copy(mach_task_self(), reinterpret_cast<vm_address_t>(data), size, buffer);
+ memcpy(reinterpret_cast<char*>(buffer), data, size);
- ASSERT(ret == KERN_SUCCESS);
- if (ret != KERN_SUCCESS) {
- vm_deallocate(mach_task_self(), buffer, size);
- return nullptr;
- }
-
return adoptPtr(new PurgeableBuffer(reinterpret_cast<char*>(buffer), size));
}
Modified: tags/Safari-534.49.1/Source/WebKit2/ChangeLog (92401 => 92402)
--- tags/Safari-534.49.1/Source/WebKit2/ChangeLog 2011-08-04 19:35:35 UTC (rev 92401)
+++ tags/Safari-534.49.1/Source/WebKit2/ChangeLog 2011-08-04 19:42:31 UTC (rev 92402)
@@ -1,3 +1,22 @@
+2011-08-02 Lucas Forschler <[email protected]>
+
+ Merged 92231.
+
+ 2011-08-01 Michael Saboff <[email protected]>
+
+ Virtual copying of FastMalloc allocated memory causes madvise MADV_FREE_REUSABLE errors
+ https://bugs.webkit.org/show_bug.cgi?id=65502
+
+ Reviewed by Anders Carlsson.
+
+ Changed OOL message to use MACH_MSG_PHYSICAL_COPY flag instead of virtual flag
+ so that the original memory region isn't referenced by the message and ultimately
+ the receiving process. The additional reference caused madvise(MADV_FREE_REUSABLE)
+ to fail when it encountered such pages.
+
+ * Platform/CoreIPC/mac/ConnectionMac.cpp:
+ (CoreIPC::Connection::sendOutgoingMessage):
+
2011-06-22 Lucas Forschler <[email protected]>
Merged 89436.
Modified: tags/Safari-534.49.1/Source/WebKit2/Platform/CoreIPC/mac/ConnectionMac.cpp (92401 => 92402)
--- tags/Safari-534.49.1/Source/WebKit2/Platform/CoreIPC/mac/ConnectionMac.cpp 2011-08-04 19:35:35 UTC (rev 92401)
+++ tags/Safari-534.49.1/Source/WebKit2/Platform/CoreIPC/mac/ConnectionMac.cpp 2011-08-04 19:42:31 UTC (rev 92402)
@@ -155,7 +155,7 @@
if (messageSize > sizeof(buffer)) {
messageBodyIsOOL = true;
- attachments.append(Attachment(arguments->buffer(), arguments->bufferSize(), MACH_MSG_VIRTUAL_COPY, false));
+ attachments.append(Attachment(arguments->buffer(), arguments->bufferSize(), MACH_MSG_PHYSICAL_COPY, false));
numberOfOOLMemoryDescriptors++;
messageSize = machMessageSize(0, numberOfPortDescriptors, numberOfOOLMemoryDescriptors);
}