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. |
||
|---|---|---|
| .. | ||
| AbstractMachine | ||
| Parser | ||
| Printer | ||
| Rust | ||
| Tests | ||
| WASI | ||
| CMakeLists.txt | ||
| Constants.h | ||
| CraneliftBridge.cpp | ||
| CraneliftStubs.cpp | ||
| Forward.h | ||
| Opcode.h | ||
| Types.h | ||
| Wasi.h | ||