Skip to content

refactor(fspy): retain C string lengths in path resolution - #616

Merged
wan9chi merged 1 commit into
agent/sigsafe-macos-getpathfrom
agent/sigsafe-cstr-paths
Aug 9, 2026
Merged

refactor(fspy): retain C string lengths in path resolution#616
wan9chi merged 1 commit into
agent/sigsafe-macos-getpathfrom
agent/sigsafe-cstr-paths

Conversation

@wan9chi

@wan9chi wan9chi commented Aug 9, 2026

Copy link
Copy Markdown
Member

Motivation

Path resolution currently converts sigsafe::CStr<Thin> back into core::ffi::CStr, so its terminator scan produces only a temporary slice. Count into sigsafe::CStr<Fat>, expose its bytes without the terminator, and use that retained length while resolving paths.

This keeps the callback and allocation behavior unchanged so the following PR can review the output-ownership change independently.

@wan9chi wan9chi changed the title agent/sigsafe cstr paths refactor(fspy): carry C strings through path resolution Aug 9, 2026
@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown

fspy benchmark

linux

dynamic/launch             change  -0.43%  [ -5.90% ..  +5.39%]  overhead   +62.59%
dynamic/access             change  +0.57%  [ -8.81% .. +11.59%]  overhead    +8.08%
dynamic/access-relative    change  +0.58%  [-10.25% .. +19.69%]  overhead   +49.79%
static/launch              change  +1.17%  [ -6.25% ..  +8.68%]  overhead  +180.65%
static/access              change  +0.10%  [ -7.41% .. +11.64%]  overhead  +826.57%
static/access-relative     change  -1.41%  [ -8.49% ..  +7.77%]  overhead +1215.93%

macos

dynamic/launch             change  -0.14%  [ -3.30% ..  +3.49%]  overhead  +220.11%
dynamic/access             change  +0.73%  [ -1.08% ..  +3.58%]  overhead    +4.04%
dynamic/access-relative    change  +0.11%  [ -5.22% ..  +5.34%]  overhead  +250.89%

windows

dynamic/launch             change  -0.16%  [ -7.67% ..  +4.71%]  overhead   +26.64%
dynamic/access             change  -0.18%  [ -1.61% ..  +1.45%]  overhead    +1.87%
dynamic/access-relative    change  +0.54%  [ -0.36% ..  +1.65%]  overhead    +1.70%

@wan9chi
wan9chi force-pushed the agent/sigsafe-cstr-paths branch 2 times, most recently from 2b371d5 to d11b23e Compare August 9, 2026 11:50
@wan9chi
wan9chi force-pushed the agent/sigsafe-cstr-paths branch from d11b23e to eaa4ad5 Compare August 9, 2026 11:59
@wan9chi
wan9chi force-pushed the agent/sigsafe-cstr-paths branch 2 times, most recently from 264c83c to 57d22a2 Compare August 9, 2026 12:18
@wan9chi
wan9chi force-pushed the agent/sigsafe-cstr-paths branch 2 times, most recently from f75f819 to cf125de Compare August 9, 2026 12:34
@wan9chi
wan9chi force-pushed the agent/sigsafe-cstr-paths branch from cf125de to 8f3e7e6 Compare August 9, 2026 12:41
@wan9chi
wan9chi force-pushed the agent/sigsafe-cstr-paths branch 2 times, most recently from 16d1b86 to ecf1426 Compare August 9, 2026 13:00
@wan9chi
wan9chi force-pushed the agent/sigsafe-cstr-paths branch from ecf1426 to 3421475 Compare August 9, 2026 13:03
@wan9chi
wan9chi force-pushed the agent/sigsafe-cstr-paths branch from 3421475 to 547b9f2 Compare August 9, 2026 13:28
@wan9chi
wan9chi force-pushed the agent/sigsafe-cstr-paths branch from 547b9f2 to 5ccdaf5 Compare August 9, 2026 13:36
@wan9chi
wan9chi force-pushed the agent/sigsafe-cstr-paths branch from 5ccdaf5 to 91477d9 Compare August 9, 2026 14:08
@wan9chi
wan9chi force-pushed the agent/sigsafe-cstr-paths branch from 91477d9 to 8f16499 Compare August 9, 2026 14:09
@wan9chi
wan9chi force-pushed the agent/sigsafe-cstr-paths branch 2 times, most recently from e668a24 to ba4ac92 Compare August 9, 2026 15:21
@wan9chi
wan9chi force-pushed the agent/sigsafe-cstr-paths branch 2 times, most recently from 38c23e9 to 3b35d81 Compare August 9, 2026 15:38
@wan9chi
wan9chi force-pushed the agent/sigsafe-cstr-paths branch from 3b35d81 to 14d6316 Compare August 9, 2026 15:46
@wan9chi wan9chi changed the title refactor(fspy): carry C strings through path resolution refactor(fspy): retain C string lengths in path resolution Aug 9, 2026
Co-authored-by: GPT-5 Codex <codex@openai.com>
@wan9chi
wan9chi force-pushed the agent/sigsafe-cstr-paths branch from 14d6316 to 6f47415 Compare August 9, 2026 16:26
@wan9chi
wan9chi marked this pull request as ready for review August 9, 2026 16:40
@wan9chi
wan9chi merged commit 928b5a8 into main Aug 9, 2026
19 checks passed
@wan9chi
wan9chi deleted the agent/sigsafe-cstr-paths branch August 9, 2026 16:44
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