Bug 180425 - IsoAlignedMemoryAllocator needs to free all of its memory when the VM destructs
Summary: IsoAlignedMemoryAllocator needs to free all of its memory when the VM destructs
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Filip Pizlo
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-12-05 08:38 PST by Filip Pizlo
Modified: 2017-12-05 13:56 PST (History)
7 users (show)

See Also:


Attachments
the patch (1.82 KB, patch)
2017-12-05 13:32 PST, Filip Pizlo
sbarati: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Filip Pizlo 2017-12-05 08:38:32 PST
...
Comment 1 Filip Pizlo 2017-12-05 08:55:42 PST
Otherwise we will have leaks due to iso-allocated MarkedBlocks from workers, like here:

https://build.webkit.org/LeaksViewer/?url=%2Fresults%2FApple%20High%20Sierra%20%28Leaks%29%2Fr225314%20%281178%29%2F
Comment 2 Filip Pizlo 2017-12-05 13:32:03 PST
Created attachment 328491 [details]
the patch
Comment 3 Saam Barati 2017-12-05 13:36:14 PST
Comment on attachment 328491 [details]
the patch

View in context: https://bugs.webkit.org/attachment.cgi?id=328491&action=review

> Source/JavaScriptCore/heap/IsoAlignedMemoryAllocator.cpp:64
> +    if (!result)
> +        return nullptr;

Lets make the above "tryFastAlignedMalloc"
Comment 4 Filip Pizlo 2017-12-05 13:45:52 PST
Comment on attachment 328491 [details]
the patch

View in context: https://bugs.webkit.org/attachment.cgi?id=328491&action=review

> Source/JavaScriptCore/heap/IsoAlignedMemoryAllocator.cpp:41
> +        free(block);

Also, I should call fastFree here.
Comment 5 Filip Pizlo 2017-12-05 13:55:26 PST
Landed in https://trac.webkit.org/changeset/225540/webkit
Comment 6 Radar WebKit Bug Importer 2017-12-05 13:56:21 PST
<rdar://problem/35863996>