Bug 256837 - Memory leak in compression stream to blob conversion
Summary: Memory leak in compression stream to blob conversion
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: Safari 16
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: youenn fablet
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-05-16 06:23 PDT by Jozef
Modified: 2023-05-23 23:55 PDT (History)
6 users (show)

See Also:


Attachments
example (892 bytes, text/html)
2023-05-16 06:23 PDT, Jozef
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jozef 2023-05-16 06:23:58 PDT
Created attachment 466360 [details]
example

Safari uses enormous amount of memory and eventually crashes when using new CompressionStream API with response.blob(). 

Open this page and click the button. Open memory monitor and you will see enormous increase in RAM consumption. I tested the same code in Chrome and I was not able to see any notable memory change detected.

https://gist.github.com/Joozty/250d0d76c2af273ebfc953883c0e47e4
Comment 1 Radar WebKit Bug Importer 2023-05-16 09:30:49 PDT
<rdar://problem/109409251>
Comment 2 Brandon 2023-05-16 10:28:12 PDT
@Jozef Thanks for the test case; I am able to reproduce.
Comment 3 Brandon 2023-05-16 14:13:48 PDT
Did some debugging today, and we are holding on to several references that should be getting freed.
Comment 4 youenn fablet 2023-05-23 05:46:52 PDT
Pull request: https://github.com/WebKit/WebKit/pull/14239
Comment 5 EWS 2023-05-23 23:55:08 PDT
Committed 264462@main (37e5346e6e28): <https://commits.webkit.org/264462@main>

Reviewed commits have been landed. Closing PR #14239 and removing active labels.