ladybird/Libraries/LibWasm
Andreas Kling c9e135cdff LibWasm: Clear FD_CLOEXEC on shm fd before spawning Cranelift child
On macOS, the cranelift JIT compilation step works by creating an
anonymous shared memory segment via shm_open() in the parent process
and passing the fd as an argument to the spawned cranelift-compiler
child. POSIX requires shm_open() to set FD_CLOEXEC on the returned
fd, which caused the child to immediately fail with EBADF when it
tried to read from the inherited fd number.

Clear FD_CLOEXEC after shm_open() so the fd actually survives the
spawn. The Linux memfd_create() path is unaffected since we call it
with flags=0 (no MFD_CLOEXEC), and Windows passes an inheritable
HANDLE instead of an fd.
2026-05-11 09:57:33 +02:00
..
AbstractMachine LibWasm: Avoid huge switches in all handlers' log functions 2026-05-10 16:41:42 +02:00
Parser LibWasm: Implement call_ref and return_call_ref instructions 2026-03-07 16:05:20 +01:00
Printer LibWasm: Implement call_ref and return_call_ref instructions 2026-03-07 16:05:20 +01:00
Rust LibWasm+Meta: Add Cranelift AOT compilation backend 2026-05-10 16:41:42 +02:00
Tests LibWasm: Add a regression test for cross-module memory access 2026-05-10 16:41:42 +02:00
WASI LibWasm: Split parameters from locals 2026-02-02 14:11:49 +01:00
CMakeLists.txt LibWasm+Meta: Add Cranelift AOT compilation backend 2026-05-10 16:41:42 +02:00
Constants.h LibWasm: Parse and validate array types 2026-02-10 13:00:16 +01:00
CraneliftBridge.cpp LibWasm: Clear FD_CLOEXEC on shm fd before spawning Cranelift child 2026-05-11 09:57:33 +02:00
CraneliftStubs.cpp LibWasm+Meta: Add Cranelift AOT compilation backend 2026-05-10 16:41:42 +02:00
Forward.h LibWasm: Prepare for VM and direct function calls 2026-05-10 16:41:42 +02:00
Opcode.h LibWasm+Meta: Add Cranelift AOT compilation backend 2026-05-10 16:41:42 +02:00
Types.h LibWasm+Meta: Add Cranelift AOT compilation backend 2026-05-10 16:41:42 +02:00
Wasi.h Everywhere: Slap some [[clang::lifetimebound]] where appropriate 2025-09-01 11:11:38 +02:00