Skip to content

refactor(fspy-shm): stat backing files through sigsafe - #631

Draft
wan9chi wants to merge 1 commit into
feat/fspy-shm-injected-runtimefrom
feat/fspy-shm-sigsafe-stat
Draft

refactor(fspy-shm): stat backing files through sigsafe#631
wan9chi wants to merge 1 commit into
feat/fspy-shm-injected-runtimefrom
feat/fspy-shm-sigsafe-stat

Conversation

@wan9chi

@wan9chi wan9chi commented Aug 10, 2026

Copy link
Copy Markdown
Member

Motivation

After opening through raw syscalls, Linux fspy_shm still queried metadata and owned the descriptor through std::fs::File. This PR reads the backing size with sigsafe fstat and retains a sigsafe OwnedFd, so attachment no longer depends on libc for metadata or descriptor teardown.

Co-authored-by: GPT-5 Codex <codex@openai.com>
@github-actions

Copy link
Copy Markdown

fspy benchmark

linux

dynamic/launch             change  +0.81%  [ -5.66% ..  +7.53%]  overhead   +53.05%
dynamic/access             change  +0.60%  [ -3.88% ..  +4.74%]  overhead    +5.46%
dynamic/access-relative    change  -0.63%  [-11.13% .. +25.87%]  overhead   +45.25%
static/launch              change  +1.06%  [ -8.02% .. +11.10%]  overhead  +151.54%
static/access              change  -0.19%  [ -6.75% ..  +8.06%]  overhead  +775.57%
static/access-relative     change  -0.08%  [ -6.98% ..  +5.85%]  overhead +1115.93%

macos

dynamic/launch             change  -0.39%  [ -5.04% ..  +5.52%]  overhead  +246.06%
dynamic/access             change  +1.03%  [-47.75% .. +25.31%]  overhead    +1.77%
dynamic/access-relative    change  +0.66%  [-29.93% .. +33.04%]  overhead  +236.54%

windows

dynamic/launch             change  +1.42%  [ -6.48% ..  +7.18%]  overhead   +27.51%
dynamic/access             change  +0.00%  [ -0.91% ..  +1.94%]  overhead    +1.66%
dynamic/access-relative    change  +0.35%  [ -1.60% ..  +1.95%]  overhead    +1.62%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant