Bug 263105 - Reload tab and allocate WASM memory may cause the outofmemory error.
Summary: Reload tab and allocate WASM memory may cause the outofmemory error.
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebAssembly (show other bugs)
Version: Safari 16
Hardware: iPhone / iPad iOS 16
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-10-12 19:47 PDT by fishel.feng
Modified: 2023-10-13 15:07 PDT (History)
4 users (show)

See Also:


Attachments
oom error (183.82 KB, image/png)
2023-10-12 19:47 PDT, fishel.feng
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description fishel.feng 2023-10-12 19:47:29 PDT
Created attachment 468196 [details]
oom error

We allocate a shared memory by this function, but after refreshing the page multiple times, we will get the memory failed without any error in console. After adding a try...catch, we can catch an error OutOfMemory. It seems that the memory is not released after refreshing the page, causing the new memory to fail to initialize.

function AllocateWasmSharedMemory(init, max) {
  return new WebAssembly.Memory({
    initial: init,
    maximum: max,
    shared: true,
  });
}
Comment 1 Radar WebKit Bug Importer 2023-10-13 15:07:54 PDT
<rdar://problem/116938080>