Title: [289328] branches/safari-613-branch/Source/bmalloc
Revision
289328
Author
[email protected]
Date
2022-02-07 18:56:47 -0800 (Mon, 07 Feb 2022)

Log Message

Cherry-pick r288866. rdar://problem/88303899

    [libpas] get_num_free_bytes_for_each_heap_callback() is called with `arg` pointing to uninitialized stack memory
    <https://webkit.org/b/235931>
    <rdar://problem/88303899>

    Reviewed by Yusuke Suzuki.

    * libpas/src/libpas/pas_all_heaps.c:
    (pas_all_heaps_get_num_free_bytes):
    - Initialize `result` stack variable to zero.

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@288866 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

Diff

Modified: branches/safari-613-branch/Source/bmalloc/ChangeLog (289327 => 289328)


--- branches/safari-613-branch/Source/bmalloc/ChangeLog	2022-02-08 02:56:44 UTC (rev 289327)
+++ branches/safari-613-branch/Source/bmalloc/ChangeLog	2022-02-08 02:56:47 UTC (rev 289328)
@@ -1,5 +1,34 @@
 2022-02-07  Russell Epstein  <[email protected]>
 
+        Cherry-pick r288866. rdar://problem/88303899
+
+    [libpas] get_num_free_bytes_for_each_heap_callback() is called with `arg` pointing to uninitialized stack memory
+    <https://webkit.org/b/235931>
+    <rdar://problem/88303899>
+    
+    Reviewed by Yusuke Suzuki.
+    
+    * libpas/src/libpas/pas_all_heaps.c:
+    (pas_all_heaps_get_num_free_bytes):
+    - Initialize `result` stack variable to zero.
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@288866 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2022-01-31  David Kilzer  <[email protected]>
+
+            [libpas] get_num_free_bytes_for_each_heap_callback() is called with `arg` pointing to uninitialized stack memory
+            <https://webkit.org/b/235931>
+            <rdar://problem/88303899>
+
+            Reviewed by Yusuke Suzuki.
+
+            * libpas/src/libpas/pas_all_heaps.c:
+            (pas_all_heaps_get_num_free_bytes):
+            - Initialize `result` stack variable to zero.
+
+2022-02-07  Russell Epstein  <[email protected]>
+
         Cherry-pick r288342. rdar://problem/87249133
 
     [libpas] medium directory lookup should bail if begin_index is zero to catch races with expendable memory decommit (cherry pick 434465bfb8e0c285d6763cf6aa0e04982199f824)

Modified: branches/safari-613-branch/Source/bmalloc/libpas/src/libpas/pas_all_heaps.c (289327 => 289328)


--- branches/safari-613-branch/Source/bmalloc/libpas/src/libpas/pas_all_heaps.c	2022-02-08 02:56:44 UTC (rev 289327)
+++ branches/safari-613-branch/Source/bmalloc/libpas/src/libpas/pas_all_heaps.c	2022-02-08 02:56:47 UTC (rev 289328)
@@ -193,7 +193,7 @@
 
 size_t pas_all_heaps_get_num_free_bytes(pas_lock_hold_mode heap_lock_hold_mode)
 {
-    size_t result;
+    size_t result = 0;
     pas_heap_lock_lock_conditionally(heap_lock_hold_mode);
     pas_all_heaps_for_each_heap(get_num_free_bytes_for_each_heap_callback, &result);
     result += pas_utility_heap_get_num_free_bytes();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to