Title: [249914] trunk/Source/_javascript_Core
- Revision
- 249914
- Author
- [email protected]
- Date
- 2019-09-16 13:29:43 -0700 (Mon, 16 Sep 2019)
Log Message
[JSC] REGRESSION (r248938): Leak of uint32_t arrays in testFastForwardCopy32()
<https://webkit.org/b/201804>
Reviewed by Saam Barati.
* b3/testb3_8.cpp:
(testFastForwardCopy32): Allocate arrays using
WTF::makeUniqueArray<uint32_t> to fix leaks caused by continue
statements.
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (249913 => 249914)
--- trunk/Source/_javascript_Core/ChangeLog 2019-09-16 20:24:39 UTC (rev 249913)
+++ trunk/Source/_javascript_Core/ChangeLog 2019-09-16 20:29:43 UTC (rev 249914)
@@ -1,3 +1,15 @@
+2019-09-16 David Kilzer <[email protected]>
+
+ [JSC] REGRESSION (r248938): Leak of uint32_t arrays in testFastForwardCopy32()
+ <https://webkit.org/b/201804>
+
+ Reviewed by Saam Barati.
+
+ * b3/testb3_8.cpp:
+ (testFastForwardCopy32): Allocate arrays using
+ WTF::makeUniqueArray<uint32_t> to fix leaks caused by continue
+ statements.
+
2019-09-16 Saam Barati <[email protected]>
JSObject::putInlineSlow should not ignore "__proto__" for Proxy
Modified: trunk/Source/_javascript_Core/b3/testb3_8.cpp (249913 => 249914)
--- trunk/Source/_javascript_Core/b3/testb3_8.cpp 2019-09-16 20:24:39 UTC (rev 249913)
+++ trunk/Source/_javascript_Core/b3/testb3_8.cpp 2019-09-16 20:29:43 UTC (rev 249914)
@@ -26,6 +26,8 @@
#include "config.h"
#include "testb3.h"
+#include <wtf/UniqueArray.h>
+
#if ENABLE(B3_JIT)
template<typename T>
@@ -874,14 +876,18 @@
for (size_t arrsize : { 1, 4, 5, 6, 8, 10, 12, 16, 20, 40, 100, 1000}) {
size_t overlapAmount = 5;
+ UniqueArray<uint32_t> array1, array2;
uint32_t* arr1, *arr2;
if (overlap) {
- arr1 = new uint32_t[arrsize * 2];
+ array1 = makeUniqueArray<uint32_t>(arrsize * 2);
+ arr1 = &array1[0];
arr2 = arr1 + (arrsize - overlapAmount);
} else {
- arr1 = new uint32_t[arrsize];
- arr2 = new uint32_t[arrsize];
+ array1 = makeUniqueArray<uint32_t>(arrsize);
+ array2 = makeUniqueArray<uint32_t>(arrsize);
+ arr1 = &array1[0];
+ arr2 = &array2[0];
}
if (!aligned && arrsize < 3)
@@ -915,12 +921,6 @@
--arr1;
--arr2;
}
-
- if (!overlap) {
- delete[] arr1;
- delete[] arr2;
- } else
- delete[] arr1;
}
}
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes