From 8a11a03297d716e1f21b03fe133d5741e0d47438 Mon Sep 17 00:00:00 2001 From: Dylan Conway Date: Thu, 29 Jan 2026 16:04:44 -0800 Subject: [PATCH 1/2] [publish images] From adc1a6b05c24b1177e4c15f0ae0e54db5f00b519 Mon Sep 17 00:00:00 2001 From: Dylan Conway Date: Thu, 29 Jan 2026 17:18:57 -0800 Subject: [PATCH 2/2] Fix aarch64 SIGILL: disable mimalloc LSE atomics + update WebKit + QEMU verification (#26586) Fixes illegal instruction (SIGILL) crashes on ARMv8.0 aarch64 CPUs (Cortex-A53, Raspberry Pi 4, AWS a1 instances). ## Root cause Upstream mimalloc force-enables `MI_OPT_ARCH` on arm64, which adds `-march=armv8.1-a` and emits LSE atomic instructions (`casa`, `swpa`, `ldaddl`). These are not available on ARMv8.0 CPUs. ## Fix - Pass `MI_NO_OPT_ARCH=ON` to mimalloc on aarch64 (has priority over `MI_OPT_ARCH` in mimalloc's CMake) - Update WebKit to autobuild-596e48e22e3a1090e5b802744a7938088b1ea860 which explicitly passes `-march` flags to the WebKit build ## Verification Includes QEMU-based baseline CPU verification CI steps (#26571) that catch these regressions automatically. --- cmake/targets/BuildMimalloc.cmake | 14 ++++++++++++-- cmake/tools/SetupWebKit.cmake | 2 +- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/cmake/targets/BuildMimalloc.cmake b/cmake/targets/BuildMimalloc.cmake index 874891765f..c503920a2a 100644 --- a/cmake/targets/BuildMimalloc.cmake +++ b/cmake/targets/BuildMimalloc.cmake @@ -69,8 +69,18 @@ if(ENABLE_VALGRIND) list(APPEND MIMALLOC_CMAKE_ARGS -DMI_VALGRIND=ON) endif() -# Enable SIMD optimizations when not building for baseline (older CPUs) -if(NOT ENABLE_BASELINE) +# Enable architecture-specific optimizations when not building for baseline. +# On Linux aarch64, upstream mimalloc force-enables MI_OPT_ARCH which adds +# -march=armv8.1-a (LSE atomics). This crashes on ARMv8.0 CPUs +# (Cortex-A53, Raspberry Pi 4, AWS a1 instances). Use MI_NO_OPT_ARCH +# to prevent that, but keep SIMD enabled. -moutline-atomics for runtime +# dispatch to LSE/LL-SC. macOS arm64 always has LSE (Apple Silicon) so +# MI_OPT_ARCH is safe there. +if(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64|arm64|ARM64|AARCH64" AND NOT APPLE) + list(APPEND MIMALLOC_CMAKE_ARGS -DMI_NO_OPT_ARCH=ON) + list(APPEND MIMALLOC_CMAKE_ARGS -DMI_OPT_SIMD=ON) + list(APPEND MIMALLOC_CMAKE_ARGS "-DCMAKE_C_FLAGS=-moutline-atomics") +elseif(NOT ENABLE_BASELINE) list(APPEND MIMALLOC_CMAKE_ARGS -DMI_OPT_ARCH=ON) list(APPEND MIMALLOC_CMAKE_ARGS -DMI_OPT_SIMD=ON) endif() diff --git a/cmake/tools/SetupWebKit.cmake b/cmake/tools/SetupWebKit.cmake index deb529de47..9763f3cf38 100644 --- a/cmake/tools/SetupWebKit.cmake +++ b/cmake/tools/SetupWebKit.cmake @@ -2,7 +2,7 @@ option(WEBKIT_VERSION "The version of WebKit to use") option(WEBKIT_LOCAL "If a local version of WebKit should be used instead of downloading") if(NOT WEBKIT_VERSION) - set(WEBKIT_VERSION 9a2cc42ae1bf693a0fd0ceb9b1d7d965d9cfd3ea) + set(WEBKIT_VERSION 515344bc5d65aa2d4f9ff277b5fb944f0e051dcd) endif() # Use preview build URL for Windows ARM64 until the fix is merged to main