Title: [199447] releases/WebKitGTK/webkit-2.12/Source/bmalloc
Revision
199447
Author
[email protected]
Date
2016-04-13 02:37:31 -0700 (Wed, 13 Apr 2016)

Log Message

Merge r198693 - Unreviewed, try to fix a crash seen on the bots.

        * bmalloc/Allocator.cpp:
        (bmalloc::Allocator::reallocate): We have to take the lock even if we're
        only reading our own data becuse LargeObject contains validation code
        that will read our neighbors' data as well.

Modified Paths

Diff

Modified: releases/WebKitGTK/webkit-2.12/Source/bmalloc/ChangeLog (199446 => 199447)


--- releases/WebKitGTK/webkit-2.12/Source/bmalloc/ChangeLog	2016-04-13 09:37:19 UTC (rev 199446)
+++ releases/WebKitGTK/webkit-2.12/Source/bmalloc/ChangeLog	2016-04-13 09:37:31 UTC (rev 199447)
@@ -1,5 +1,14 @@
 2016-03-25  Geoffrey Garen  <[email protected]>
 
+        Unreviewed, try to fix a crash seen on the bots.
+
+        * bmalloc/Allocator.cpp:
+        (bmalloc::Allocator::reallocate): We have to take the lock even if we're
+        only reading our own data becuse LargeObject contains validation code
+        that will read our neighbors' data as well.
+
+2016-03-25  Geoffrey Garen  <[email protected]>
+
         bmalloc: Renamed LargeChunk => Chunk
         https://bugs.webkit.org/show_bug.cgi?id=155894
 

Modified: releases/WebKitGTK/webkit-2.12/Source/bmalloc/bmalloc/Allocator.cpp (199446 => 199447)


--- releases/WebKitGTK/webkit-2.12/Source/bmalloc/bmalloc/Allocator.cpp	2016-04-13 09:37:19 UTC (rev 199446)
+++ releases/WebKitGTK/webkit-2.12/Source/bmalloc/bmalloc/Allocator.cpp	2016-04-13 09:37:31 UTC (rev 199447)
@@ -120,12 +120,13 @@
         break;
     }
     case ObjectType::Large: {
+        std::lock_guard<StaticMutex> lock(PerProcess<Heap>::mutex());
+
         LargeObject largeObject(object);
         oldSize = largeObject.size();
 
         if (newSize < oldSize && newSize > smallMax) {
             if (oldSize - newSize >= largeMin) {
-                std::lock_guard<StaticMutex> lock(PerProcess<Heap>::mutex());
                 newSize = roundUpToMultipleOf<largeAlignment>(newSize);
                 PerProcess<Heap>::getFastCase()->shrinkLarge(lock, largeObject, newSize);
                 return object;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to