[Webkit-unassigned] [Bug 201804] New: [JSC] Leak of uint32_t arrays in testFastForwardCopy32()
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sun Sep 15 07:01:56 PDT 2019
https://bugs.webkit.org/show_bug.cgi?id=201804
Bug ID: 201804
Summary: [JSC] Leak of uint32_t arrays in
testFastForwardCopy32()
Product: WebKit
Version: WebKit Nightly Build
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: JavaScriptCore
Assignee: webkit-unassigned at lists.webkit.org
Reporter: ddkilzer at webkit.org
Leak of uint32_t arrays in testFastForwardCopy32() due to `continue` statements not releasing memory allocated by `new`.
void testFastForwardCopy32()
{
#if CPU(X86_64)
for (const bool aligned : { true, false }) {
for (const bool overlap : { false, true }) {
for (size_t arrsize : { 1, 4, 5, 6, 8, 10, 12, 16, 20, 40, 100, 1000}) {
size_t overlapAmount = 5;
uint32_t* arr1, *arr2;
if (overlap) {
arr1 = new uint32_t[arrsize * 2];
arr2 = arr1 + (arrsize - overlapAmount);
} else {
arr1 = new uint32_t[arrsize];
arr2 = new uint32_t[arrsize];
}
if (!aligned && arrsize < 3)
continue; // LEAKS!
if (overlap && arrsize <= overlapAmount + 3)
continue; // LEAKS!
[...]
if (!overlap) {
delete[] arr1;
delete[] arr2;
} else
delete[] arr1;
}
}
}
#endif
}
<https://trac.webkit.org/browser/webkit/trunk/Source/JavaScriptCore/b3/testb3_8.cpp>
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20190915/c397000a/attachment.html>
More information about the webkit-unassigned
mailing list