Bug 255461 - jitCompileSIMDFunction crash during webapp load
Summary: jitCompileSIMDFunction crash during webapp load
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: Safari 16
Hardware: Mac (Apple Silicon) macOS 13
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-04-14 10:04 PDT by sblochwehbas
Modified: 2024-02-07 14:26 PST (History)
6 users (show)

See Also:


Attachments
Crash Report from Console.app. (308.83 KB, text/plain)
2023-04-14 10:04 PDT, sblochwehbas
no flags Details
Console crash report when using WebAssembly.compile on WASM SIMD (92.64 KB, text/plain)
2023-11-28 13:56 PST, Michael Hagar
no flags Details
Crash Log of build 274235@main (76.72 KB, text/plain)
2024-02-07 14:18 PST, Tommy Li
no flags Details
Translated Crash Report of build 274235@main (46.48 KB, text/plain)
2024-02-07 14:26 PST, Tommy Li
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description sblochwehbas 2023-04-14 10:04:52 PDT
Created attachment 465917 [details]
Crash Report from Console.app.

Safari 16.4 18615.1.26.11.23
MacOS 13.3.1
Apple M1 Max
64 GB RAM

Crashing quite frequently on our web app during initial load/startup.
Comment 1 Radar WebKit Bug Importer 2023-04-14 10:12:28 PDT
<rdar://problem/108054708>
Comment 2 Michael Hagar 2023-11-28 13:56:48 PST
Created attachment 468791 [details]
Console crash report when using WebAssembly.compile on WASM SIMD

I'm seeing a similar crash when trying to use WebAssembly.compile or WebAssembly.compileStreaming on a certain WebAssembly file that uses SIMD instructions on the main thread, then passing the compiled WebAssembly module toa worker thread, and the instantiating said module.

Not using SIMD doesn't lead to a crash, and using instantiate / instantiateStreaming doesn't lead to a crash either. So it seems to be related to a combination of using SIMD and using WebAssembly.compile / WebAssembly.compileStreaming.

I attached the crash report found in the Console app.
Comment 3 Tommy Li 2024-02-07 14:18:03 PST
Created attachment 469762 [details]
Crash Log of build 274235@main
Comment 4 Tommy Li 2024-02-07 14:24:22 PST
I have also been seeing similar issues since Safari 16.4, till the latest 17.3. The latest development build 274235@main also crashes with our SIMD-enabled WebAssembly file. 

Our WebAssembly file is compiled from a C++ codebase with the Emscripten toolchain (Version 3.1.53, the latest as of writing). 

To concur with Michael, in our development, some of our WebAssembly files compiled with SIMD enabled do not actually crash Safari, only a certain other file does when extra C++ code are include. We have yet to closely examine what code is causing the crash.
Comment 5 Tommy Li 2024-02-07 14:26:27 PST
Created attachment 469763 [details]
Translated Crash Report of build 274235@main

Attached is the translated report of the crash for your information.