Title: [92942] branches/safari-534.51-branch/Source

Diff

Modified: branches/safari-534.51-branch/Source/_javascript_Core/ChangeLog (92941 => 92942)


--- branches/safari-534.51-branch/Source/_javascript_Core/ChangeLog	2011-08-12 06:17:16 UTC (rev 92941)
+++ branches/safari-534.51-branch/Source/_javascript_Core/ChangeLog	2011-08-12 06:21:40 UTC (rev 92942)
@@ -1,5 +1,22 @@
 2011-08-11  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-08-11  Lucas Forschler  <[email protected]>
+
     Merged 91728
 
     2011-07-25  Filip Pizlo  <[email protected]>

Modified: branches/safari-534.51-branch/Source/WebCore/ChangeLog (92941 => 92942)


--- branches/safari-534.51-branch/Source/WebCore/ChangeLog	2011-08-12 06:17:16 UTC (rev 92941)
+++ branches/safari-534.51-branch/Source/WebCore/ChangeLog	2011-08-12 06:21:40 UTC (rev 92942)
@@ -1,5 +1,26 @@
 2011-08-11  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-08-11  Lucas Forschler  <[email protected]>
+
     Merged 92132
 
     2011-07-28  Abhishek Arya  <[email protected]>

Modified: branches/safari-534.51-branch/Source/WebCore/platform/mac/PurgeableBufferMac.cpp (92941 => 92942)


--- branches/safari-534.51-branch/Source/WebCore/platform/mac/PurgeableBufferMac.cpp	2011-08-12 06:17:16 UTC (rev 92941)
+++ branches/safari-534.51-branch/Source/WebCore/platform/mac/PurgeableBufferMac.cpp	2011-08-12 06:21:40 UTC (rev 92942)
@@ -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: branches/safari-534.51-branch/Source/WebKit2/ChangeLog (92941 => 92942)


--- branches/safari-534.51-branch/Source/WebKit2/ChangeLog	2011-08-12 06:17:16 UTC (rev 92941)
+++ branches/safari-534.51-branch/Source/WebKit2/ChangeLog	2011-08-12 06:21:40 UTC (rev 92942)
@@ -1,5 +1,24 @@
 2011-08-11  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-08-11  Lucas Forschler  <[email protected]>
+
     Merged 91961
 
     2011-07-28  Anders Carlsson  <[email protected]>

Modified: branches/safari-534.51-branch/Source/WebKit2/Platform/CoreIPC/mac/ConnectionMac.cpp (92941 => 92942)


--- branches/safari-534.51-branch/Source/WebKit2/Platform/CoreIPC/mac/ConnectionMac.cpp	2011-08-12 06:17:16 UTC (rev 92941)
+++ branches/safari-534.51-branch/Source/WebKit2/Platform/CoreIPC/mac/ConnectionMac.cpp	2011-08-12 06:21:40 UTC (rev 92942)
@@ -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);
     }
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to