Bug 281657

Summary: Reloading pages with shared Wasm memory in workers leads to memory leaks
Product: WebKit Reporter: Ivan Čurić <ivan.curic>
Component: WebAssemblyAssignee: Yijia Huang <yijia_huang>
Status: RESOLVED FIXED    
Severity: Normal CC: keith_miller, mark.lam, rreno, serebniti, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari 18   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Wasm worker with shared memory leak none

Ivan Čurić
Reported 2024-10-17 02:20:38 PDT
Created attachment 472967 [details] Wasm worker with shared memory leak If a website is using shared WebAssembly.Memory in a web worker, Safari will retain the memory between page reloads. This can be tested on https://rreverser.com/wasm-bindgen-rayon-demo/ by reloading the page while monitoring the memory usage in Activity Monitor. Reproducible on iOS 18 and MacOS 15 Related issues: https://bugs.webkit.org/show_bug.cgi?id=222097 https://bugs.webkit.org/show_bug.cgi?id=250569#c11
Attachments
Wasm worker with shared memory leak (9.15 MB, video/quicktime)
2024-10-17 02:20 PDT, Ivan Čurić
no flags
Radar WebKit Bug Importer
Comment 1 2024-10-24 02:21:14 PDT
Yijia Huang
Comment 2 2024-10-27 22:04:12 PDT
EWS
Comment 3 2024-10-29 10:06:01 PDT
Committed 285841@main (5b0655d476fe): <https://commits.webkit.org/285841@main> Reviewed commits have been landed. Closing PR #35780 and removing active labels.
Ivan Čurić
Comment 5 2025-01-21 02:05:06 PST
This bug is still present in Safari 18.2 and reproducible with a pthread powered emscripten build loaded in a worker: https://youtu.be/gx808H6MOhA I will try to make a repro sample
Mark Lam
Comment 6 2025-01-21 06:44:50 PST
As always, please file a new bugzilla. It may not be the same bug.
Note You need to log in before you can comment on or make changes to this bug.