You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(fspy): gate ipc channel module on non-musl targets (#328)
## Summary
Gate the entire `fspy_shared::ipc::channel` module behind
`#[cfg(not(target_env = "musl"))]`. The shared-memory IPC channel exists
to move path accesses from the preload library to the supervisor, but on
musl targets the preload library isn't built (seccomp-only tracking is
used). With no senders, the channel produces no data, and creating it on
musl just wastes a 4 GiB shared-memory region, a lock file, and a
blocking receiver-lock step after the child exits.
### Changes
- `fspy_shared::ipc::channel` module is now non-musl only
- `fspy::ipc` (re-exports `OwnedReceiverLockGuard`, `SHM_CAPACITY`) is
non-musl only
- `fspy::unix::SpyImpl::spawn` skips channel creation on musl
- `PathAccessIterable` drops its `ipc_receiver_lock_guard` field on
musl; `iter()` only yields arena-collected accesses there
- Fixed latent issue exposed by this PR: `Payload::seccomp_payload`'s
`struct_field_names` `#[expect]` is now `#[cfg_attr(not(target_env =
"musl"), ...)]` since on musl `Payload` has only this one field and
clippy's `struct_field_names` lint no longer fires
Windows paths are untouched — they never satisfy `target_env = "musl"`.
## Test plan
- [x] `cargo check --workspace --all-features` on host (glibc)
- [x] `cargo check --workspace --all-features --target
x86_64-unknown-linux-musl`
- [x] `cargo clippy --workspace --all-targets --all-features -- -D
warnings` on host
- [x] `cargo fmt --check`
- [x] `RUSTDOCFLAGS='-D warnings' cargo doc --no-deps
--document-private-items`
- [x] `cargo test -p fspy_shared -p fspy_shared_unix` (24 pass)
- [x] `cargo test -p fspy --test node_fs` — exercises the full spawn +
IPC pipeline (8 pass)
https://claude.ai/code/session_01VqiMHiGeViu1pGhWwJ67Qc
Co-authored-by: Claude <noreply@anthropic.com>
0 commit comments