Repository navigation
Conversation
…tives Add low-level `no_std` filesystem, I/O, and allocator-backed path resolution primitives needed by the freestanding Linux ELF/SIGSYS tracker and shared Unix exec resolver: - `fspy_nostd`: `Error::ACCES`, `pread`, `faccessat`, `stat`/`fstat`, `getcwd`, `readlinkat`/`fcntl_getpath`, plus unit tests. - `fspy_nostd_alloc`: allocator-backed `getcwd`, `fd_path`, `resolve_path_at`, and pooled bump allocator helpers, plus unit tests. - `vt_ipc_str`: `IpcStr::as_bytes` for Unix and `target_os = "none"`. - `fspy_shared`: gate host dev-dependencies on `not(target_os = "none")`. Co-authored-by: Gemini 4 Neon <noreply@google.com>
fspy benchmarklinuxmacoswindows |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 6730e4b. Configure here.
Co-authored-by: Gemini 4 Neon <noreply@google.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Motivation
Replacing Linux
LD_PRELOADandseccomp_unotifywith an in-process freestanding (target_os = "none") ELF/SIGSYSlauncher requiresno_stdUnix filesystem, I/O, and allocator-backed path-resolution primitives shared between the freestanding Linux launcher and the macOS preload library.Changes
fspy_nostd: addError::ACCES(plus.typos.toml),pread,faccessat,stat/fstat,getcwd,readlinkat/fcntl_getpath, andOwnedFd::from_raw_fd, with unit tests.fspy_nostd_alloc: add allocator-backedgetcwd,fd_path,resolve_path_at, andPooledBumphelpers, with unit tests.vt_ipc_str: exposeIpcStr::as_bytesfor Unix andtarget_os = "none".fspy_shared: gate host dev-dependencies onnot(target_os = "none")for bare-metal builds.Stack created with GitHub Stacks CLI • Give Feedback 💬
Note
Medium Risk
Large expansion of low-level syscall/fs and path-resolution code used in constrained (SIGSYS/preload) contexts; logic errors could mis-resolve paths or mishandle fds, though changes are well-tested.
Overview
Expands
fspy_nostdUnix surface for freestanding/macOS preload: moreErrorerrno constants (includingACCES),pread,faccessatwithAccessFlags, richerStat/is_regular_file(), extraOFlags, Linuxfcntldup/CLOEXEC helpers, and publicOwnedFd::from_raw_fd, each covered by new tests.fspy_nostd_allocadds allocator-backedfd_path(CWD,/proc/self/fd, or macOSfcntl_getpath) andresolve_path_atfor joining paths relative to a dirfd, plus aPooledBumpwrapper that usesinline(never)on allocator methods in debug builds to avoid stack blowups on tight signal/vfork stacks.Smaller follow-ons:
IpcStr::as_byteson Unix/none,fspy_shareddev-deps gated off bare metal,tempfileas alloc-crate dev-dep, and.typos.tomlallowACCES.Reviewed by Cursor Bugbot for commit 06d7fc4. Bugbot is set up for automated code reviews on this repo. Configure here.