Skip to content

feat(fspy): add no-std Windows module lookup - #656

Merged
wan9chi merged 2 commits into
mainfrom
agent/windows-nostd-module-lookup
Aug 13, 2026
Merged

feat(fspy): add no-std Windows module lookup#656
wan9chi merged 2 commits into
mainfrom
agent/windows-nostd-module-lookup

Conversation

@wan9chi

@wan9chi wan9chi commented Aug 12, 2026

Copy link
Copy Markdown
Member

Motivation

The Windows preload initializes under the loader lock, where loading another DLL can deadlock or run unsafe initialization. Extend fspy_nostd to Windows with unit-generic C strings, a WideCStr alias, static wide literals, and get_module_name, which queries an already-loaded module through GetModuleHandleW.

Migrate AttachContext away from LoadLibraryA. KernelBase remains optional, while missing Kernel32 or NTDLL modules are reported to the caller.

@wan9chi
wan9chi force-pushed the agent/windows-nostd-module-lookup branch from 3c2fba3 to ffbefa9 Compare August 12, 2026 16:27
@github-actions

github-actions Bot commented Aug 12, 2026

Copy link
Copy Markdown

fspy benchmark

linux

dynamic/launch             change  +0.84%  [ -8.68% .. +10.53%]  overhead   +52.07%
dynamic/access             change  -1.01%  [-18.83% ..  +8.65%]  overhead    +6.60%
dynamic/access-relative    change  +0.00%  [-20.26% .. +13.62%]  overhead   +45.27%
static/launch              change  +2.24%  [ -8.95% .. +15.72%]  overhead  +149.79%
static/access              change  +1.48%  [ -9.47% .. +11.22%]  overhead  +890.66%
static/access-relative     change  +0.99%  [ -5.11% ..  +7.97%]  overhead +1227.11%

macos

dynamic/launch             change  +0.15%  [ -2.25% ..  +2.93%]  overhead  +217.19%
dynamic/access             change  +0.36%  [ -2.17% ..  +3.30%]  overhead    +8.09%
dynamic/access-relative    change  +0.22%  [ -3.30% ..  +2.65%]  overhead  +251.75%

windows

dynamic/launch             change  +0.10%  [ -6.10% ..  +5.90%]  overhead   +25.97%
dynamic/access             change  +0.54%  [-11.82% .. +18.59%]  overhead    +1.78%
dynamic/access-relative    change  -0.50%  [-21.72% .. +31.47%]  overhead    +1.73%

Base automatically changed from agent/rename-fspy-nostd to main August 13, 2026 00:34
@wan9chi
wan9chi force-pushed the agent/windows-nostd-module-lookup branch from ffbefa9 to 8719c56 Compare August 13, 2026 00:34
Co-authored-by: GPT-5 Codex <codex@openai.com>
@wan9chi
wan9chi force-pushed the agent/windows-nostd-module-lookup branch from 8719c56 to 3d8e4d6 Compare August 13, 2026 00:34
Co-authored-by: GPT-5 Codex <codex@openai.com>
@wan9chi
wan9chi marked this pull request as ready for review August 13, 2026 02:03
@wan9chi
wan9chi merged commit 9c22f76 into main Aug 13, 2026
19 checks passed
@wan9chi
wan9chi deleted the agent/windows-nostd-module-lookup branch August 13, 2026 02:09
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